StatefulBuilder class
A platonic component that both has state and calls a closure to obtain its child component.
The StateSetter function passed to the builder is used to invoke a rebuild instead of a typical State's State.setState.
Since the builder is re-invoked when the StateSetter is called, any variables that represents state should be kept outside the builder function.
See also:
- Builder, the platonic stateless component.
- Inheritance
-
- Object
- Component
- StatefulComponent
- StatefulBuilder
Constructors
- StatefulBuilder({Key? key, required StatefulComponentBuilder builder})
-
Creates a component that both has state and delegates its build to a callback.
const
Properties
- builder → StatefulComponentBuilder
-
Called to obtain the child component.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one component replaces another component in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → Element -
Creates a StatefulElement to manage this component's location in the tree.
inherited
-
createState(
) → State< StatefulBuilder> -
Creates the mutable state for this component at a given location in the tree.
override
-
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