palancana / bloc_examples

Examples of the Flutter starter incrementer app with multiple BLoC pattern implementations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Examples of BLoC Usage

A compilation of commented Flutter starter incrementer app examples, that uses BLoC.

Implementations

  • Local Instance: This example uses a plain local instance, which can be good enough for some situations.

    final incrementBloc = IncrementBloc();
  • Ancestor Provider as Stateful Widget: A generic bloc provider (code by Didier Boelens) can instantiate any BLoC that implements the provider. It can then be accesed like:

    IncrementBloc incrementBloc = BlocProvider.of<IncrementBloc>(context);

Acknowledgement

The examples were done thanks to the fantastic explanation from these articles:

About

Examples of the Flutter starter incrementer app with multiple BLoC pattern implementations.


Languages

Language:Dart 80.9%Language:Objective-C 12.7%Language:Java 6.4%