flutter_stetho 0.2.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 91

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

Follow the installation instructions on the Pub website

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.

0.2.2 - 10 Nov 2018

  • Bugfix: Show correct request headers when using http client

0.2.1 - 19 Oct 2018

  • Bugfix: Imports were broken

0.2.0 - 19 Oct 2018

  • BREAKING CHANGE: Use Stetho.initialize() instead of overriding the HTTP Client!
  • This allows us to initialize the Android code only when Stetho.initialize() is invoked, rather than running Stetho by default, which is bad for production builds.
  • More work to be done on stripping the plugin from the APK during production builds. Flutter issue opened.

0.1.2 - 17 Aug 2018

  • Fix connectionTimeout. Thanks @pcqpcq!

0.1.1 - 27 Apr 2018

  • Fix docs

0.1.0 - 27 Apr 2018

  • Fix for Dart 2. Thanks @thejakeofink!

0.0.1 - 4 Mar 2018

  • Initial version, with support for network inspection on Android via the Chrome Dev Tools using Stetho

example/README.md

flutter_stetho_example

Demonstrates how to use the flutter_stetho plugin.

Getting Started

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_stetho: ^0.2.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_stetho/flutter_stetho.dart';
  
Version Uploaded Documentation Archive
0.2.2 Nov 10, 2018 Go to the documentation of flutter_stetho 0.2.2 Download flutter_stetho 0.2.2 archive
0.2.1 Oct 19, 2018 Go to the documentation of flutter_stetho 0.2.1 Download flutter_stetho 0.2.1 archive
0.2.0 Oct 19, 2018 Go to the documentation of flutter_stetho 0.2.0 Download flutter_stetho 0.2.0 archive
0.1.2 Aug 17, 2018 Go to the documentation of flutter_stetho 0.1.2 Download flutter_stetho 0.1.2 archive
0.1.1 Apr 27, 2018 Go to the documentation of flutter_stetho 0.1.1 Download flutter_stetho 0.1.1 archive
0.1.0 Apr 27, 2018 Go to the documentation of flutter_stetho 0.1.0 Download flutter_stetho 0.1.0 archive
0.0.1 Mar 4, 2018 Go to the documentation of flutter_stetho 0.0.1 Download flutter_stetho 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
83
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
91
Learn more about scoring.

We analyzed this package on Nov 14, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.6
  • Flutter: 0.11.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8