0 purchases
process value
Process Value #
A declarative representation of a process.
Meant to treat a process declaratively, as a stream of values.
This concept is similar to AsyncValue from Riverpod but with a much more stripped-down implementation.
Installation 💻 #
❗ In order to start using Process Value you must have the Dart SDK installed on your machine.
Add process_value to your pubspec.yaml:
dependencies:
process_value:
copied to clipboard
Install it:
dart pub get
copied to clipboard
Usage #
Stream<ProcessValue<int>> loadMyInteger() async* {
yield ProcessValue.loading(0);
await Future.delayed(const Duration(seconds: 1));
yield ProcessValue.loading(0.5);
await Future.delayed(const Duration(seconds: 1));
yield ProcessValue.loading(0.5);
yield ProcessValue.data(42);
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.