SingleChildState<W extends SingleChildStatefulWidget> class abstract

The state of a SingleChildStatefulWidget: buildWithChild gets the child given to the widget, or the one a MultiProvider gives it.

Inheritance

Constructors

SingleChildState()

Properties

context → BuildContext
The element of this state, from its creation until dispose returns.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
mounted → bool
Whether this state has an element: false once dispose has run.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
widget → W
The current configuration; already the new one in didUpdateWidget.
no setterinherited

Methods

activate() → void
Called when a GlobalKey put the element, removed from the tree earlier in the frame, back in it elsewhere, before it is built there: take up again what deactivate let go.
inherited
build(BuildContext context) → Widget
Describes this part of the interface; see StatelessWidget.build.
override
buildWithChild(BuildContext context, Widget? child) → Widget
What the widget shows around child.
deactivate() → void
Called when the element is removed from the tree; activate follows if a GlobalKey puts it back elsewhere in the same frame, dispose if not.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Adds what describes this state to its element's description, after its widget's; see Widget.debugFillProperties.
inherited
didChangeDependencies() → void
Called after initState, and before the next build whenever something this state depends on changed. An inherited widget depended on here stays depended on through the builds until a later call does not ask for it again.
inherited
didUpdateWidget(covariant W oldWidget) → void
Called when the parent rebuilt with a new widget of the same type; widget is already the new one.
inherited
dispose() → void
Called when the element is unmounted for good, at the end of the frame that removed it: release what the state holds.
inherited
initState() → void
Called once, when the element is placed in the tree, before the first build. Not the place to depend on inherited widgets: that is didChangeDependencies. When it throws, the element leaves the tree again, and the state is neither deactivated nor disposed.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setState(void fn()) → void
Runs fn, which changes this state, and rebuilds the element in the owner's next build scope: any number of calls before then make one rebuild.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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