dependencies: flutter_bloc_provider: <latest_version>
BLoCProvider<BLoC> is an
Inherited Widget that allows the
BLoC to be accessible to all
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.
BLoCDisposer<BLoC> is a
Stateful Widget that wraps a child in a
BLoCProvider. The disposer
will automatically call the dispose method on the provider when it loses context.
An extensive example can be found in the root example/ directory.
/// An extensive example is available at https://github.com/CallumIddon/flutter_bloc_generator/example
Add this to your package's pubspec.yaml file:
dependencies: flutter_bloc_provider: ^0.4.0
You can install packages from the command line:
$ flutter packages get
Alternatively, your editor might support
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.5.1||May 20, 2019|
|0.5.0||Mar 27, 2019|
|0.4.0||Jan 1, 2019|
|0.3.0||Dec 31, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on May 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.