process_value

Creator: coderz1093

Last updated:

0 purchases

process_value Image
process_value Images
Add to Cart

Description:

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

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.