패키지, 저장소 및 앱 카테고리 검색

chucker_flutter 표지
패키지 상세v1.9.2

chucker_flutter

Chucker Flutter는 HTTP(S) 요청/응답을 검사하는 데 도움이 됩니다. 데이터는 로컬에 저장되며 네트워크 호출을 검사하고 콘텐츠를 공유할 수 있는 UI를 제공합니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
2.3만
좋아요
198
Pub 점수
130

패키지 설치

flutter pub add chucker_flutter

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Chucker Flutter는 앱 내에서 직접 HTTP(S) 요청과 응답을 캡처하고 표시하는 네트워크 디버깅 도구입니다. 데이터는 로컬에 저장되며, 호출 세부 정보, 헤더, 본문 및 메타데이터를 검사할 수 있는 직관적인 UI를 제공합니다. 개발 및 테스트에 적합하며, API 상호작용의 빠른 문제 해결을 가능하게 하고 공유 기능을 통해 협업도 지원합니다. 여러 플랫폼에서 사용 가능하며, Flutter 앱에 원활하게 통합됩니다.

사용 사례

  • 개발 중 API 호출 디버깅
  • 요청/응답 헤더 및 본문 검사
  • 팀원들과 네트워크 데이터 공유하기
  • 다른 조건에서 네트워크 동작 테스트
  • HTTP 요청의 성능 모니터링

주요 기능

  • 네트워크 호출의 로컬 저장
  • 인터랙티브 검사 UI
  • 모든 주요 플랫폼 지원
  • 캡처된 데이터 공유가 쉬움
  • Minimal setup with pub add
  • HTTP(S) 트래픽의 실시간 모니터링

적합한 대상

  • 활발한 개발 중인 플러터 개발자
  • API 통합에 협력하는 팀
  • 세부 네트워크 로깅이 필요한 앱
  • 프론트엔드 엔지니어가 백엔드 문제를 디버깅 중
  • QA 테스터가 API 동작을 검증하고 있습니다

고려 사항

  • 생산 환경 사용을 위한 것이 아님
  • 디버그 모드에서 성능에 영향을 미칠 수 있습니다
  • 릴리스 빌드에서 수동으로 활성화해야 합니다
  • 장치에 저장 한도가 적용될 수 있습니다
  • UI는 디버그 빌드에서만 표시됩니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Stand With Palestine

Chucker Flutter

Codecov Badge Pub.dev Badge Popularity GitHub Build Badge MIT License Badge Flutter Platform Badge Stars Developed By Badge

Chucker Flutter

StandWithPalestine

An HTTP requests inspector inspired by Chucker Android

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.

chucker http sample

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.:

final client = ChopperClient(
        baseUrl: 'https://jsonplaceholder.typicode.com',
        interceptors: [
          ChuckerChopperInterceptor(),
        ]
);

The very last thing is to connect Chucker Flutter screens to your app by wiring ChuckerFlutter.navigatorKey into whichever widget owns your root Navigator.

MaterialApp (most apps)

MaterialApp(
  navigatorKey: ChuckerFlutter.navigatorKey,
  ...,
);

MaterialApp.router with GoRouter

MaterialApp.router does not accept a navigatorKey — pass it to GoRouter instead:

final _router = GoRouter(
  navigatorKey: ChuckerFlutter.navigatorKey,
  routes: [...],
);

MaterialApp.router(
  routerConfig: _router,
  ...,
);

MaterialApp.router with a custom RouterDelegate

Pass ChuckerFlutter.navigatorKey to your delegate's constructor and use it as the key on its root Navigator:

class AppRouterDelegate extends RouterDelegate<...> {
  AppRouterDelegate() : navigatorKey = ChuckerFlutter.navigatorKey;

  @override
  final GlobalKey<NavigatorState> navigatorKey;

  @override
  Widget build(BuildContext context) {
    return Navigator(
      key: navigatorKey,
      pages: [...],
      onDidRemovePage: ...,
    );
  }
}

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.:

void main() {
  ChuckerFlutter.showOnRelease = true;
  runApp(const App());
}

Congratulations! 🎊 You are done. Rest on us!

Features

  • Support for Dio and Http
  • 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(),
  ],
);

image

Libraries

Chucker FLutter uses the following open source libraries:

Patrons

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)


Rafay Ali

Contributors

Special thanks to these wonderful people👏 who are making our community bigger and better🔥


Adeyemo Adedamola

📖

fachrifaul

📖

Navneet Singh

📖

Sergei

📖

Syifa Ainnur

📖

Erick Armen

📖

Aleksandr Lozhkovoi

📖

Leo Ngo

📖

Kashyap Bhat

📖

KeeganDC

📖

Mateen Mehmood

📖

Cuong Nguyen

📖

License

MIT License

Copyright (c) 2022 Syed Murtaza

Permission is 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 Software is
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.

카테고리

의존성

의존성 목록 5 개

소스 저장소

이 패키지를 사용하는 프로젝트