StateSet<T extends StatefulWidget> mixin

Manages the collection of State objects extended by the SetState class

Superclass Constraints

Properties

context BuildContext
The location in the tree where this widget builds.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
mounted bool
Whether this State object is currently in a tree.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
widget → T
The current configuration.
no setterinherited

Methods

activate() → void
In case the State object is reinserted in the Widget tree.
override
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
inherited
deactivate() → void
In case there is a 'hot reload' for example and the State object is re-created.
override
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
didChangeDependencies() → void
Called when a dependency of this State object changes.
inherited
didUpdateWidget(covariant T oldWidget) → void
Switch out the old StatefulWidget object with the new one.
override
dispose() → void
Remove objects from the static Maps if not already removed. add this function to the State object's dispose function
override
initState() → void
Adds StatefulWidget to a static map add this function to the State object's initState() function. Adds State object to a static map
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reassemble() → void
Called whenever the application is reassembled during debugging, for example during hot reload.
inherited
refresh() → void
'Refresh' the State object's widget tree
setState(VoidCallback fn) → void
Notify the framework that the internal state of this object has changed.
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
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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

Static Properties

lastContext BuildContext?
Retrieve the latest context (i.e. the last State object's context)
no setter
root StateSet<StatefulWidget>?
Retrieve the first StateSet object
no setter

Static Methods

of<T extends StatefulWidget, U extends State<StatefulWidget>>() → U?
Retrieve the type of State object by its StatefulWidget Returns null if not found
rebuildState(StatefulWidget? widget) bool
Call setState() from the State object from the specified StatefulWidget Return true if successful Usually called in the StatefulWidget passing 'this' as a parameter.
refreshState(StatefulWidget? widget) bool
Call setState() from the State object from the specified StatefulWidget Return true if successful Usually called in the StatefulWidget passing 'this' as a parameter.
setStateOf(StatefulWidget? widget, VoidCallback? fn) bool
Calls the setState() of the State objet from the specified StatefulWidget passing the specified function. Return true if successful. Usually called in the StatefulWidget passing 'this' as a parameter.
stateIn(StatefulWidget? widget) StateSet<StatefulWidget>?
Return the State object used by the specified StatefulWidget object. Usually called in the StatefulWidget passing 'this' as a parameter.
stateOf<T extends StatefulWidget>() StateSet<StatefulWidget>?
Retrieve the State object by its StatefulWidget Returns null if not found
to<T extends State<StatefulWidget>>() → T?
Retrieve the State object by type Returns null if not found Note: If there's multiple State objects of the same type, will return the 'last' state object added to the Map, _setStates"