flutter_stetho

Integrate Flutter with the Facebook Stetho tool for Android

  • 所有者: brianegan/flutter_stetho
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

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.

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.

主要指標

概覽
名稱與所有者brianegan/flutter_stetho
主編程語言Dart
編程語言Java (語言數: 6)
平台
許可證MIT License
所有者活动
創建於2018-03-04 17:49:19
推送於2021-05-16 05:18:06
最后一次提交2020-03-27 14:31:03
發布數0
用户参与
星數217
關注者數6
派生數64
提交數52
已啟用問題?
問題數27
打開的問題數14
拉請求數13
打開的拉請求數2
關閉的拉請求數5
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?