flutter_redux_dev_tools 0.3.0

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

flutter_redux_dev_tools

Build Status codecov

A Widget you can use to show a Redux Time Travel UI. Simply put it in a part of your UI that makes sense (Such as a Dev Tools Drawer), pass it a DevToolsStore and you'll be good to go!

Note: This Widget does not work with a normal Redux Store. It is meant to work with the redux_dev_tools package, which provides a DevToolsStore. The DevToolsStore is a drop-in replacement for your Store during Development!

Demo

A simple Flutter app that allows you to Increment and Decrement a counter.

A screenshot of the Dev Tools in Action

Usage

  1. Create a main_dev.dart file
  2. In this file, create a DevToolsStore in place of a normal redux Store
  3. Create a ReduxDevTools widget, passing through the Store. You can place this Widget wherever makes sense in your app! One good suggestion: In a "Dev Tools Drawer." This is generally the endDrawer in your Scaffold, and can contain different types of tools for a Dev Build of your app.

Example

This example paints only a broad outline of how to use the ReduxDevTools. For a complete example, see the example folder.

int addReducer(int state, action) => state + 1;

// Create a DevToolsStore instead of a normal Store during Development
final store = new DevToolsStore<int>(
  addReducer,
  initialState: 0,
);

// Finally, create your app with a Redux Dev Tools
main() { 
  runApp(new MaterialApp(
    home: new Scaffold(
      endDrawer: new ReduxDevTools<int>(store),
    ),
  ));
}

Credits

All of this is inspired by the original Redux Devtools.

Changelog

0.3.0

  • Update for Dart 2 & Redux 3.0.0, and redux_dev_tools 0.4.0

0.2.0

  • Fix broken Action / State Dialogs for new version of Flutter
  • Redesign to fit better in a dev drawer
  • Add ReduxDevToolsContainer. See changes to your reducers in real time! If this Widget wraps your app, your app will automatically rerun all actions in the DevToolsStore through your reducers on Hot Reload.
  • Use latest version of redux_dev_tools

0.1.4

  • Move to github

0.1.3

  • Document which Redux lib it works with

0.1.2

  • Add license to satisfy Pub.

0.1.1

  • Fix dependencies

0.1.0

  • Initial version, includes a ReduxDevTools Widget that allows you to time travel through the states of your DevToolsStore. Requires Dart redux and redux_dev_tools.

example/lib/main.dart

import 'package:example/app.dart';
import 'package:flutter/widgets.dart';
import 'package:redux/redux.dart';
import 'package:example/store.dart';

// The production version of your app. Relies on a real store, and does not
// pull in any dev dependencies!
//
// In addition, it will not create a Dev Drawer.
void main() {
  runApp(new App(
    store: new Store(
      counterReducer,
      initialState: 0,
    ),
  ));
}

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_redux_dev_tools: "^0.3.0"

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_redux_dev_tools/flutter_redux_dev_tools.dart';
  
Version Uploaded Documentation Archive
0.3.0 Apr 1, 2018 Go to the documentation of flutter_redux_dev_tools 0.3.0 Download flutter_redux_dev_tools 0.3.0 archive
0.2.0 Dec 15, 2017 Go to the documentation of flutter_redux_dev_tools 0.2.0 Download flutter_redux_dev_tools 0.2.0 archive
0.1.4 Nov 25, 2017 Go to the documentation of flutter_redux_dev_tools 0.1.4 Download flutter_redux_dev_tools 0.1.4 archive
0.1.3 Aug 29, 2017 Go to the documentation of flutter_redux_dev_tools 0.1.3 Download flutter_redux_dev_tools 0.1.3 archive
0.1.2 Aug 28, 2017 Go to the documentation of flutter_redux_dev_tools 0.1.2 Download flutter_redux_dev_tools 0.1.2 archive

Analysis

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

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3
  • Flutter: 0.5.4

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
75 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
87
Learn more about scoring.

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 hints.

    Strong-mode analysis of lib/flutter_redux_dev_tools.dart gave the following hint:

    line: 132 col: 21
    'child' is deprecated and shouldn't be used.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
flutter_redux >=0.5.0 <0.6.0 0.5.2
redux >=3.0.0 <4.0.0 3.0.0
redux_dev_tools >=0.4.0 <0.5.0 0.4.0
Transitive dependencies
collection 1.14.6 1.14.10
meta 1.1.5
sky_engine 0.0.99
typed_data 1.1.5
vector_math 2.0.6 2.0.7
Dev dependencies
flutter_test