flutter_bloc_provider 0.5.1 copy "flutter_bloc_provider: ^0.5.1" to clipboard
flutter_bloc_provider: ^0.5.1 copied to clipboard

outdated

Flutter provider and disposer widgets for generated BLoC classes from bloc_generator.

flutter_bloc_provider #

This package is part of a number of packages designed to help create BLoC architected code in Dart and Flutter. You can view them all in the repository here.

This README relies on the fact that you have read the main README.

Installation #

dependencies:
  flutter_bloc_provider: <latest_version>

Provider #

A BLoCProvider<BLoC> is an InheritedWidget that allows the BLoC to be accessible to sub widgets. Calling BLoCProvider<BLoC>.of(context) will return the BLoC from the tree.

Make sure you call the dispose method of the BLoCProvider when you are done with it to close any open streams and stop any services.

Disposer #

A BLoCDisposer<BLoC> is a StatefulWidget that wraps a child in a BLoCProvider. The disposer will automatically call the dispose method on the provider when it loses context.

0
likes
30
pub points
20%
popularity

Publisher

unverified uploader

Flutter provider and disposer widgets for generated BLoC classes from bloc_generator.

Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

Dependencies

bloc_annotations, flutter

More

Packages that depend on flutter_bloc_provider