BlocBuilderWidget<S extends BlocState> class

Handles building a widget when BloC's state changes.

Inheritance
Implemented types

Constructors

BlocBuilderWidget({Key? key, required BlocBuilder<S> builder, required Bloc<S> bloc, bool forceBuildWhenInializating = true, bool onlyWhenInitializing = false, bool forceBuildWhenBusy = true, bool onlyWhenBusy = false, bool waitForData = false, WidgetBuilder? loadingBuilder, bool buildWhen(S previous, S next)?})
const

Properties

bloc Bloc<S>
The Bloc that the widget will listen to.
final
builder BlocBuilder<S>
A function that builds a widget based on the BlocState.
final
buildWhen → (bool Function(S previous, S next)?)
A function that indicates whether the widget should be rebuilt.
final
forceBuildWhenBusy bool
Indicates whether the widget should be rebuilt when the Bloc is busy. Must be used with buildWhen to work properly.
final
forceBuildWhenInializating bool
Indicates whether the widget should be rebuilt when the Bloc is initializing. Must be used with buildWhen to work properly.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingBuilder WidgetBuilder?
A function that builds a widget when the Bloc is loading.
final
onlyWhenBusy bool
Indicates whether the widget should only be built when the Bloc is busy.
final
onlyWhenInitializing bool
Indicates whether the widget should only be built when the Bloc is initializing.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
waitForData bool
Indicates whether the widget should wait for data before building.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _BlocBuilderWidgetState<S>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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