value_stream 0.0.2
value_stream: ^0.0.2 copied to clipboard
Flutter package that provides a set of basic streams with easy access to the latest emitted value
About #
Simple and easy to use set of basic streams with direct access to the latest emitted value.
Stream #
- Use
DataStreamfor simple data stream, without error handling (provides direct access to latest value) - Use
EventStreamfor a stream that needs error handling, with access to latest emitted value or error.
StreamBuilder #
Provides handy adapted StreamBuilders
DataStreamBuilderfor aDataStream.EventStreamBuilderfor aEventStream.
Package in development: documentation, examples and more to come.
Motivation #
Simplify Flutter reactive programming with basic streams that handle latest emited value, and avoid un-needed Snapshot objects when possible.
Features #
- No dependencies other than Flutter
- Simple code
Getting started #
To install this package, follow this instruction.
Usage #
TODO: finish Include short and useful examples for package users. Add longer examples to /example folder.
const like = 'sample';
Alternatives #
You can also look at theses packages that may better match your needs.
- The stream_with_value package, but uses single-subscription stream instead of broadcast stream.
- The sstream package, but doesn't have an error-less stream like
DataStream.