flutter_bloc_provider 0.4.0

  • README.md
  • Example
  • Installing
  • Versions
  • 78

flutter_bloc_provider #

Installation #

  flutter_bloc_provider: <latest_version>

Provider #

A 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.

Disposer #

A 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.

Example #

An extensive example can be found in the root example/ directory.

0.4.0 #

  • flutter_bloc packages moved to bloc

0.3.0 #

  • Split out providers and disposers into this package


/// An extensive example is available at https://github.com/CallumIddon/flutter_bloc_generator/example

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_bloc_provider: ^0.4.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_bloc_provider/flutter_bloc_provider.dart';
Version Uploaded Documentation Archive
0.5.1 May 20, 2019 Go to the documentation of flutter_bloc_provider 0.5.1 Download flutter_bloc_provider 0.5.1 archive
0.5.0 Mar 27, 2019 Go to the documentation of flutter_bloc_provider 0.5.0 Download flutter_bloc_provider 0.5.0 archive
0.4.0 Jan 1, 2019 Go to the documentation of flutter_bloc_provider 0.4.0 Download flutter_bloc_provider 0.4.0 archive
0.3.0 Dec 31, 2018 Go to the documentation of flutter_bloc_provider 0.3.0 Download flutter_bloc_provider 0.3.0 archive
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]
Learn more about scoring.

We analyzed this package on May 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.0
  • pana: 0.12.15
  • Flutter: 1.5.8


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
bloc_annotations 0.4.0 0.4.0 0.5.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8