ControlRoot class

Typically root Widget of whole Application. Controls current localization, theme and App state. Can initialize Control and pass arguments to Control.initControl.

Only one ControlRoot is allowed in Widget Tree !

Inheritance

Constructors

ControlRoot({ThemeConfig<ControlTheme>? theme, CrossTransition? transition, AppState initState = AppState.init, List<AppStateBuilder> states = const [], required AppWidgetBuilder app, Future onSetupChanged(ControlRootSetup setup)?})
Root Widget of whole app. Initializes Control and handles localization and theme changes. Notifies about AppState changes and animates Widget swapping.
const

Properties

app AppWidgetBuilder
Function to typically builds WidgetsApp or MaterialApp or CupertinoApp. Builder provides Key and home widget.
final
hashCode int
The hash code for this object.
no setterinherited
initState AppState
Initial app screen, default value
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onSetupChanged → (Future Function(ControlRootSetup setup)?)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
states List<AppStateBuilder>
List of app states. Widget builders and transitions.
final
theme ThemeConfig<ControlTheme>?
Config of ControlTheme and list of available ThemeData.
final
transition CrossTransition?
Default transition
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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
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

Static Methods

initControl({bool? debug, Map? entries, Map<Type, InitFactory>? factories, LocalinoOptions? localization, List<ControlModule>? modules, RoutingStoreProvider? routes, Future initAsync()?}) Future<bool>