incredux 0.1.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 50

incredux #

Created from templates made available by Stagehand under a BSD-style license.

Usage #

A simple usage example:

import 'package:redux/redux.dart';
import 'package:incredux/incredux.dart';

enum Actions { increment, decrement }

void main() {
  when(Actions.increment, (store) => print('(Increment) state: ${store.state}'));

  when( Actions.decrement, (store) => print('(Decrement) state: ${store.state}'));

  int counterReducer(int state, dynamic action) {
    if (action == Actions.increment) {
      return state + 1;
    } else if (action == Actions.decrement) {
      return state - 1;

    return state;

  var store = Store<int>(
    initialState: 0,
    middleware: <Middleware<int>>[

  store.dispatch(Actions.increment); // Print: `(Increment) state: 1`
  store.dispatch(Actions.decrement); // Print: `(Increment) state: 0` - because did call increment before

Features and bugs #

Please file feature requests and bugs at the issue tracker.

1.0.0 #

  • Initial version, created by Stagehand


import 'package:incredux/incredux.dart';

main() {}

Use this package as a library

1. Depend on it

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

  incredux: ^0.1.2

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:incredux/incredux.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 Jan 17, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Fix lib/src/middleware.dart. (-1 points)

Analysis of lib/src/middleware.dart reported 2 hints:

line 20 col 1: Prefer using /// for doc comments.

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

Fix lib/src/when.dart. (-0.50 points)

Analysis of lib/src/when.dart reported 1 hint:

line 5 col 1: Prefer using /// for doc comments.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (redux).

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

Package is getting outdated. (-3.84 points)

The package was last published 54 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
redux ^3.0.0 3.0.0 4.0.0
Dev dependencies
test ^1.0.0