SelectRebuilder<S, E, A extends ReducerAction, T> class

Rebuild a portion of the widget tree when a selected portion of state changes.

The SelectRebuilder widget is designed be used in combination with ComponentWidget to scope rebuilding down to a specific section of the widget tree. This is because the ComponentWidget does not automatically rebuild on state change for performance reasons.

SelectRebuilder takes a store from the ComponentWidget and a select function that is responsible for taking in the stores state and returning the piece of that state which you want to trigger rebuild on. It also takes the bulider function in to build a widget based on changed value.

Inheritance
Annotations

Constructors

SelectRebuilder({Key? key, required StoreInterface<S, E, A> store, required T select(S), required Widget builder(BuildContext context, T value, Widget? child)})
const

Properties

builder Widget Function(BuildContext context, T value, Widget? child)
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
select → T Function(S)
final
store StoreInterface<S, E, A>
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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