consumer 0.2.0 consumer: ^0.2.0 copied to clipboard
consumer is like react-consumer state manage, use Stream at dart, consumer have memo and shoudWidgetUpdate function to intercept update.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add consumer
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
consumer: ^0.2.0
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:consumer/consumer.dart';