CoreWidget class abstract
Base abstract Widget that controls State, stores args
and keeps Widget/State in harmony though lifecycle of Widget.
CoreWidget extends StatefulWidget and completely solves State specific flow. This solution helps to use it like StatelessWidget, but with benefits of StatefulWidget.
This Widget comes with TickerControl
and SingleTickerControl
mixin to create Ticker and provide access to vsync
. Then use ControlModel with TickerComponent to get access to TickerProvider.
ControlWidget - Can subscribe to multiple ControlModels and is typically used for Pages and complex Widgets.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CoreWidget
- Implementers
Constructors
- CoreWidget({Key? key, Map initArgs = const {}})
-
Base Control Widget that handles State flow.
args
- Arguments passed to this Widget and also to ControlModels.const
Properties
Methods
-
createElement(
) → CoreContext -
Creates a StatefulElement to manage this widget's location in the tree.
override
-
createState(
) → CoreState< CoreWidget> -
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
-
onDependencyChanged(
CoreContext context) → void - Called whenever dependency of Widget is changed. Check State.didChangeDependencies for more info.
-
onDispose(
) → void -
onInit(
Map args, CoreContext context) → void -
onUpdate(
CoreWidget oldWidget) → void - Called whenever Widget needs update. Check State.didUpdateWidget for more info.
-
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