flutter_flipperkit 0.0.19

flutter_flipperkit #

pub package Donate

English | 简体中文

Table of Contents #

Created by gh-md-toc

Introduction #

Flipper (Extensible mobile app debugger) for flutter.

Features #

  • Network inspector network

  • Shared preferences (and UserDefaults) inspector shared-preferences

  • Redux inspector

Quick Start #

Prerequisites #

Before starting make sure you have:

Installation #

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

dependencies:
  flutter_flipperkit: ^0.0.19

If you are using a stable version of Flutter, please add it in the following way:

dependencies:
  flutter_flipperkit:
    git:
      url: https://github.com/blankapp/flutter_flipperkit
      ref: stable

Change your project ios/Podfile file according to the example:

# Uncomment this line to define a global platform for your project
-# platform :ios, '8.0'
+platform :ios, '9.0'

Change your project files according to the example:

android/app/build.gradle:

android {
-    compileSdkVersion 27
+    compileSdkVersion 28

    defaultConfig {
-        targetSdkVersion 27
+        targetSdkVersion 28
    }
}

android/app/gradle.properties:

+android.useAndroidX=true
+android.enableJetifier=true

android/settings.gradle:

...

plugins.each { name, path ->
    def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
    include ":$name"
    project(":$name").projectDir = pluginDirectory

+    if (name == 'flutter_flipperkit') {
+        include ':flipper-no-op'
+        project(':flipper-no-op').projectDir = new File(pluginDirectory, 'flipper-no-op')
+    }
}

...

You can install packages from the command line:

$ flutter packages get

Usage #

import 'package:flutter_flipperkit/flutter_flipperkit.dart';

void main() {
  FlipperClient flipperClient = FlipperClient.getDefault();

  flipperClient.addPlugin(new FlipperNetworkPlugin(
    // If you use http library, you must set it to false and use https://pub.dev/packages/flipperkit_http_interceptor
    // useHttpOverrides: false,
    // Optional, for filtering request
    filter: (HttpClientRequest request) {
      String url = '${request.uri}';
      if (url.startsWith('https://via.placeholder.com') || url.startsWith('https://gravatar.com')) {
        return false;
      }
      return true;
    }
  ));
  flipperClient.addPlugin(new FlipperReduxInspectorPlugin());
  flipperClient.addPlugin(new FlipperSharedPreferencesPlugin());
  flipperClient.start();

  runApp(MyApp());
}

...

Please refer to flutter_flipperkit_examples project, to integrate flutter_flipperkit into your project.

Run the app #

$ flutter run

Known Issues (to note) #

  • 【iOS】If you use use_frameworks! in your Podfile, Please see the issue.

Discussion #

If you have any suggestions or questions about this project, you can discuss it by Telegram Group or my wechat.

License #

MIT License

Copyright (c) 2019 JianyingLi <lijy91@foxmail.com>

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.

0.0.19 #

  • Upgrade flipper to 0.23.1

0.0.18 #

  • Network plugin supports flutter beta 1.7.8

0.0.17 #

  • Fixed Netword plugin not working when filter is null

0.0.16 #

  • Upgrade flipper to 0.22.0

0.0.15 #

  • Downgrade flutter stable version

0.0.14 #

  • Fixed Netword plugin Could not get request body

0.0.13 #

  • Network plugin supports flutter dev 1.7.3
  • Add fliter to FlipperNetworkPlugin

0.0.12 #

  • Add BufferingFlipperPlugin to flipper-no-op module

0.0.11 #

  • ReduxInspector plugin supports background receiving actions

0.0.10 #

  • Upgrade flipper to 0.20.0

0.0.9 #

  • Add flipper-no-op module
  • Upgrade flipper to 0.19.0

0.0.8 #

  • Fixed NetworkPlugin (android) bugs

0.0.7 #

  • Add DatabaseBroswer Plugin
  • Add useHttpOverrides param to Network Plugin
  • Fixed ReduxInspector bugs

0.0.6 #

  • Add payloadprevStatenextState to newAction event

0.0.5 #

  • Add ReduxInspector Plugin
  • Upgrade flipper to 0.18.0

0.0.4 #

  • Fix dart low version dependency failure
  • Upgrade flipper to 0.17.0

0.0.3 #

  • Add dio 2.0 example
  • [Android] Fix json array data convert will crash
  • [iOS] Add use_frameworks! example (only cocoapods 1.5.3)

0.0.2 #

  • Add SharedPreferencesPlugin

0.0.1 #

  • Initial release

example/README.md

flutter_flipperkit_example #

Demonstrates how to use the flutter_flipperkit plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_flipperkit: ^0.0.19

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_flipperkit/flutter_flipperkit.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
73
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
81
Overall:
Weighted score of the above. [more]
83
Learn more about scoring.

We analyzed this package on Aug 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/flipper_client.dart. (-0.50 points)

Analysis of lib/flipper_client.dart reported 1 hint:

line 1 col 8: Unused import: 'dart:async'.

Fix lib/plugins/network/flipper_http_client.dart. (-0.50 points)

Analysis of lib/plugins/network/flipper_http_client.dart reported 1 hint:

line 138 col 23: Close instances of dart.core.Sink.

Format lib/flipper_plugin.dart.

Run flutter format to format lib/flipper_plugin.dart.

Fix additional 9 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/flutter_flipperkit.dart (Run flutter format to format lib/flutter_flipperkit.dart.)
  • lib/plugins/database/flipper_dbbrowser_plugin.dart (Run flutter format to format lib/plugins/database/flipper_dbbrowser_plugin.dart.)
  • lib/plugins/network/flipper_http_client_request.dart (Run flutter format to format lib/plugins/network/flipper_http_client_request.dart.)
  • lib/plugins/network/flipper_http_client_response.dart (Run flutter format to format lib/plugins/network/flipper_http_client_response.dart.)
  • lib/plugins/network/flipper_http_overrides.dart (Run flutter format to format lib/plugins/network/flipper_http_overrides.dart.)
  • lib/plugins/network/flipper_network_plugin.dart (Run flutter format to format lib/plugins/network/flipper_network_plugin.dart.)
  • lib/plugins/plugins.dart (Run flutter format to format lib/plugins/plugins.dart.)
  • lib/plugins/redux/flipper_reduxinspector_plugin.dart (Run flutter format to format lib/plugins/redux/flipper_reduxinspector_plugin.dart.)
  • lib/plugins/sharedpreferences/flipper_shared_preferences_plugin.dart (Run flutter format to format lib/plugins/sharedpreferences/flipper_shared_preferences_plugin.dart.)

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

The package description is too short. (-7 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Update README.md. (-2 points)

1 image link is insecure (e.g. http://blankapp.org/assets/images/wechat_qrcode.png), use https URLs instead.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
uuid ^2.0.0 2.0.2
Transitive dependencies
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.2
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test