redux_dev_tools 0.4.0

  • Readme
  • Changelog
  • Installing
  • 73

redux_dev_tools #

Build Status codecov

A Redux Store with a Delorean.

This library allows you to create a DevToolsStore during dev mode in place of a normal Redux Store. This DevToolsStore will act exactly like a normal Store at first, with one catch: It will allow you to travel back and forth throughout the State of your application!

You can write your own UI to travel in time, or use one of the existing options for the platform you're working with:

Demo #

Flutter #

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

A screenshot of the Dev Tools in Action

Usage #

// Start by creating a simple Reducer, or a complex one. Dealer's choice. :)
int addOneReducer(int state, action) => state + 1;

// For production mode, this is how you should create your Store.
final store = new Store(addReducer, initialState: 0);

// In Dev Mode, however, if you want to hook up to Time-Traveling 
// Dev Tools, create a `DevToolsStore` instead!
// It will act exactly like your normal Store, but give you super powers
// to travel back and forth in time throughout your app States!
// Remember: By itself this will beef up your Store, but will not provide
// a UI to Time Travel. See the libraries listed above to learn how to
// connect your Redux store to a UI! 
final store = new DevToolsStore(addReducer, initialState: 0);

Credits #

All of this code was directly inspired by the original Redux Devtools.

Changelog #

0.4.0 #

  • Fix Dart 2 environment constraint

0.3.0 #

  • Dart 2 / Redux 3.0.0 Support

0.2.0 #

  • Bump version of Redux and add distinct option to DevToolsStore

0.1.4 #

  • Don't advance position on recompute

0.1.3 #

  • Fix Type signature for Middleware

0.1.2 #

  • Move to Github

0.1.1 #

  • Update README

0.1.0 #

  • Initial version. Allows you to create a DevToolsStore during dev mode, which will allow you to time travel through the states of your application.

Use this package as a library

1. Depend on it

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

  redux_dev_tools: ^0.4.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or 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:redux_dev_tools/redux_dev_tools.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:redux_dev_tools/redux_dev_tools.dart.

Health suggestions

Fix lib/src/store.dart. (-1.49 points)

Analysis of lib/src/store.dart reported 3 hints:

line 46 col 35: Use = to separate a named parameter from its default value.

line 47 col 20: Use = to separate a named parameter from its default value.

line 48 col 18: Use = to separate a named parameter from its default value.

Format lib/src/reducer.dart.

Run dartfmt to format lib/src/reducer.dart.

Maintenance suggestions

Package is getting outdated. (-55.62 points)

The package was last published 81 weeks ago.

The package description is too short. (-20 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.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and redux_dev_tools.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
redux >=3.0.0 <4.0.0 3.0.0
Dev dependencies
test >=0.12.33 <0.13.0