O Chucker Flutter ajuda você a inspecionar as requisições/respostas HTTP(S). Ele armazena os dados localmente e fornece uma interface para inspecionar chamadas de rede e compartilhar seu conteúdo.
Orientação gerada a partir de informações públicas. Apenas para referência.
Chucker Flutter é uma ferramenta de depuração de rede que captura e exibe solicitações e respostas HTTP(S) diretamente em seu aplicativo. Ele armazena os dados localmente e oferece uma interface intuitiva para inspecionar detalhes da chamada, cabeçalhos, corpos e metadados. Ideal para desenvolvimento e testes, permite a solução rápida de problemas com interações de API e suporta o compartilhamento de dados capturados para colaboração. Disponível em múltiplas plataformas, integra-se perfeitamente aos aplicativos Flutter.
Casos de uso
Depuração de chamadas de API durante o desenvolvimento
Inspeção de cabeçalhos e corpos de solicitação/resposta
Compartilhando dados de rede com membros da equipe
Testando o comportamento da rede em diferentes condições
Monitoramento do desempenho de solicitações HTTP
Principais recursos
Armazenamento local de chamadas de rede
Interface de inspeção interativa
Suporte para todas as principais plataformas
Compartilhamento fácil de dados capturados
Minimal setup with pub add
Monitoramento em tempo real do tráfego HTTP(S)
Indicado para
Desenvolvedores Flutter em desenvolvimento ativo
Equipes colaborando em integrações de API
Aplicativos que exigem registro detalhado de rede
Engenheiros de frontend depurando problemas do backend
Testadores de QA verificando o comportamento da API
Considerações
Não destinado ao uso em produção
Pode afetar o desempenho no modo de depuração
Requer habilitação manual em builds de lançamento
Limites de armazenamento podem se aplicar no dispositivo
A interface é visível apenas em compilações de depuração
README original
Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.
Chucker Flutter inspects the HTTP(S) requests/responses triggered by your Flutter App. It works as an Interceptor and stores data related to network requests and responses on local storage, and providing a UI for inspecting and sharing their content.
Flutter Apps, using Chucker Flutter, show in-app notifications which tell the status (e.g. 200, 400, 500 and so) and requested url and upon clicking on details button it navigates to Chucker Flutter main screen. You can manipulate Chucker Flutter behaviour using its setting by navigating to Settings page from the menu button of Chucker Flutter main page.
Getting Started
To use Chucker Flutter you need to add the pub spec dependency to your pubspec.yaml file of your flutter app.
Please verify the current latest version of Chucker Flutter so that you can enjoy the latest features.
dependencies:chucker_flutter:latest-version
or
just run the command
flutter pub add chucker_flutter
To make Chucker Flutter work in Dio, just add it in your Dio object e.g.:
Dio().interceptors.add(ChuckerDioInterceptor());
To make Chucker Flutter work in Http, you need to use ChuckerHttpClient object e.g.:
final _chuckerHttpClient = ChuckerHttpClient(http.Client());
_chuckerHttpClient.get(Uri.parse('$_baseUrl$path'));
To make Chucker Flutter work in Chopper, you need to use ChuckerChopperInterceptor object e.g.:
The very last thing is to connect Chucker Flutter screens to your app by wiring ChuckerFlutter.navigatorKey into whichever widget owns your root Navigator.
The previous navigatorObservers: [ChuckerFlutter.navigatorObserver] integration is deprecated and unreliable with nested navigators — it still works as a fallback so existing apps keep running, but new integrations should use navigatorKey.
By default Chucker Flutter only runs in debug mode but you can allow it to run in release mode too using its showOnRelease property e.g.:
Works in all (Windows💻, Linux🖥️, Mac🧑💻, Web🌍, Android📱, iOS📲) platforms (⚠️For android you need to make minSdkVersion 22 in build.gradle file)
Easy integration
Customization
Localization (Current support for English 🇺🇸 and Urdu 🇵🇰)
Searching🔍 and sharing👯
Json request and responses in tree form
Json request and response in pretty json format
Image URL preview
ChuckerHttpLoggingInterceptor for better readability of http request and response sent from client. To use this just add this interceptor in your ChopperClient
final exampleClient = ChopperClient(
services: [
_$ChopperApiService(),
],
interceptors: [
ChuckerHttpLoggingInterceptor() //This for logging,ChuckerChopperInterceptor(),
],
);
Libraries
Chucker FLutter uses the following open source libraries:
I extend my sincere appreciation to all the sponsors. Thank you for making a difference in the open source community!❤️ (You can also sponsor my work, please visit patreon.com)
MIT LicenseCopyright (c) 2022SyedMurtazaPermissionis hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Softwareis
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.