BlocBuilder<T extends Bloc> class

This lets you define a builder for a Bloc that can be used for MultiBlocProvider and TestEnvironment

Unlike with Provider, you need to specify the generic. Failing to do so will set the generic to Bloc which is probably undesirable.

Constructors

BlocBuilder(CreateBloc<T> builder)
Unlike with Provider, you need to specify the generic. Failing to do so will set the generic to Bloc which is probably undesirable.

Properties

builder CreateBloc<T>
The function to create the instance of the bloc.
final
builderType Type
The type of the created bloc.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createProvider(Widget child) BlocProvider<T>
Generates the BlocProvider to be placed into the widget tree.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited