Redux-style state management built with Dart Primitives. The
Store is a simple
Stream<State> and a
Sink<Action>. This means you can
dispatch) new actions to the
add an action, it will then run through the provided
reducer. Reducers are pure functions that should only update the state in response to actions. The updated state will then be emitted to anything that is
listening to the
If you need to perform side-effects, such as communicating with a web server or database, you can write an
Effect. Each effect will receive the
Stream<State> and the
Stream<Action>. You can then use these streams to make async calls in response to an action.
I have no idea if anyone wants to use this or if it's even necessary given the fact that there are other Dart Redux solutions out there, but I did it as a thought experiment to see how close to the core Dart primitives we could get and thought I might as well publish it.
Stream<State>however you like.
Effectfor side-effects instead of transformers.
Effects cannot swallow actions that are
added to the Stream, and work with both a
LoggingEffect. Improve functionality.
Add this to your package's pubspec.yaml file:
dependencies: stream_store: ^0.1.0
You can install packages from the command line:
$ pub get
Alternatively, your editor might support
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.1.0||Nov 28, 2017|
|0.0.1||Jul 26, 2017|
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]
The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.
Support Dart 2 in
The SDK constraint in
pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.
dartdoc failed. (-10 points)
dartdoc runs without any issues.
|Dart SDK||>=1.21.0 <2.0.0|