flutter_bloc_provider 0.4.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 74

flutter_bloc_provider #

Installation #

dependencies:
  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

example/example.dart

/// 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:


dependencies:
  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.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
Popularity:
Describes how popular the package is relative to other packages. [more]
47
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
74
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.13+1
  • Flutter: 1.2.1

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
bloc_annotations 0.4.0 0.4.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