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

패키지 상세v0.5.2

flutter_stetho

Android용 Flutter를 위한 Chrome DevTools 네트워크 검사기

30일 다운로드
607
좋아요
42
Pub 점수
35

패키지 설치

flutter pub add flutter_stetho

패키지 개요

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

flutter_stetho는 안드로이드에서 플러터와 크롬 개발자 도구를 통합하는 디버깅 도구로, 개발자가 실시간으로 네트워크 요청과 응답을 검사할 수 있게 해줍니다. 페이스북의 Stetho 라이브러리를 활용하여 HTTP 트래픽에 대한 자세한 통찰력을 제공하며, 헤더, 페이로드 및 타이밍 정보를 포함합니다. 이 패키지는 종속성만 추가하면 되므로 별도의 설정 없이도 네트워크 관련 문제를 진단할 수 있는 친숙한 인터페이스를 제공하여 개발 워크플로우를 향상시킵니다. 앱 개발 및 테스트 단계에서 특히 유용합니다.

사용 사례

  • HTTP 요청 및 응답 검사
  • API 통합 디버깅
  • 네트워크 성능 모니터링
  • 연결 문제 해결
  • 실시간 네트워크 로깅

주요 기능

  • Chrome DevTools 통합
  • 네트워크 요청 검사
  • 실시간 교통 모니터링
  • pub add를 통한 간단한 설정
  • Android 전용 지원

적합한 대상

  • Flutter 개발자가 네트워크 호출 디버깅 중
  • Chrome DevTools 워크플로우를 사용하는 팀
  • API 동작에 초점을 맞춘 모바일 앱 테스터

고려 사항

  • Android 플랫폼에 한정
  • 생산 빌드에 적합하지 않습니다
  • Chrome DevTools 필요
  • 디버그 모드에서 성능에 영향을 미칠 수 있습니다
  • iOS 지원 없음

원본 README

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

flutter_stetho

A plugin that connects Flutter to the Chrome Dev Tools on Android devices via the Stetho Android Library.

Network Inspector

The main feature I was aiming to achieve was a Network Inspector.

Network Inspector in Action

Getting Started

How can you too get this plugin up and running in your own app? Follow these steps.

Install the plugin

Add flutter_stetho to your dependencies in the pubspec.yaml file

  • For Flutter 1.7.x, use version 0.3.x
  • For Flutter 1.8.x, use version 0.4.x
  • For Flutter 1.9.x, use version 0.5.x
Install StethoHttpOverrides

Next, you'll need to install the Stetho.initialize() in the main() function of your app. This will enable Stetho and allow flutter_stetho to wrap all http calls and report information to the Chrome Dev Tools via the Stetho package from Facebook.

Note: It's probably a good idea only put this override in a main_dev.dart file.

void main() {
  Stetho.initialize();

  runApp(new MyApp());
}
Run your app on an Android Device

flutter run

Open Chrome

Pop open Chrome or Chromium, navigate to chrome://inspect

You should now see your App appear in the window.

Known Issues

  • Timing may be slightly off for some requests. That's because:
  • Code is rough mvp / prototype code. Needs improvement.
  • Animated Gifs not working
  • Some error cases may not be properly handled. Need more testing / feedback to find problems.
  • No Tests
  • If the app shuts down on start up run flutter clean to remove old builds.

카테고리

소스 저장소

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