パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.5.2

flutter_stetho

Android用のFlutter用Chrome DevToolsによるネットワークインスペクター

30日間ダウンロード
607
いいね数
42
Pub ポイント
35

パッケージをインストール

flutter pub add flutter_stetho

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

flutter_stetho は、Android 上の Flutter と Chrome DevTools を統合するデバッグツールであり、開発者がリアルタイムでネットワークリクエストとレスポンスを確認できるようにします。Facebook の 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.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト