StateWithMixinBuilder<T, R> class

StateBuilder that can be mixin with one of the predefined mixin in mixinWith

Inheritance

Constructors

StateWithMixinBuilder({Key? key, dynamic tag, ReactiveModel<R> observe()?, Widget builder(BuildContext context, ReactiveModel<R>? rm)?, Widget builderWithChild(BuildContext context, ReactiveModel<R>? rm, Widget child)?, Widget? child, void initState(BuildContext context, ReactiveModel<R>? rm, T? mix)?, void dispose(BuildContext context, ReactiveModel<R>? rm, T? mix)?, void didChangeDependencies(BuildContext context, ReactiveModel<R>? rm, T? mix)?, void didUpdateWidget(BuildContext context, StateWithMixinBuilder<T, R> oldWidget, T? mix)?, void afterInitialBuild(BuildContext context, ReactiveModel<R>? rm)?, void afterRebuild(BuildContext context, ReactiveModel<R>? rm)?, void didChangeAppLifecycleState(BuildContext context, AppLifecycleState state)?, void didChangeLocales(BuildContext context, List<Locale>? locale)?, required MixinWith mixinWith})
StateBuilder that can be mixin with one of the predefined mixin in mixinWith
const

Properties

afterInitialBuild → void Function(BuildContext context, ReactiveModel<R>? rm)?
Called after the widget is inserted in the widget tree.
final
afterRebuild → void Function(BuildContext context, ReactiveModel<R>? rm)?
Called after each rebuild of the widget.
final
builder Widget Function(BuildContext context, ReactiveModel<R>? rm)?
StateWithMixinBuilder( MixinWith : MixinWith.singleTickerProviderStateMixin builder:(BuildContext context, ReactiveModel model) =>MyWidget(), )
final
builderWithChild Widget Function(BuildContext context, ReactiveModel<R>? rm, Widget child)?
StateWithMixinBuilder( MixinWith : MixinWith.singleTickerProviderStateMixin builder:(BuildContext context, ReactiveModel model, Widget child) =>MyWidget(), child : MyChildWidget(), )
final
child Widget?
The child to be used in builderWithChild.
final
didChangeAppLifecycleState → void Function(BuildContext context, AppLifecycleState state)?
StateWithMixinBuilder( didChangeAppLifecycleState:(BuildContext context, AppLifecycleState state)=> myModel.myMethod([context, state]), MixinWith : MixinWith.widgetsBindingObserver builder:(BuildContext context, ReactiveModel model) =>MyWidget(), )
final
didChangeDependencies → void Function(BuildContext context, ReactiveModel<R>? rm, T? mix)?
StateWithMixinBuilder( didChangeDependencies:(BuildContext context, TickerProvider ticker)=> myModel.myMethod([context, ticker]), MixinWith : MixinWith.singleTickerProviderStateMixin builder:(BuildContext context, ReactiveModel model) =>MyWidget(), )
final
didChangeLocales → void Function(BuildContext context, List<Locale>? locale)?
Called when the system tells the app that the user's locale has changed. For example, if the user changes the system language settings.
final
didUpdateWidget → void Function(BuildContext context, StateWithMixinBuilder<T, R> oldWidget, T? mix)?
StateWithMixinBuilder( didUpdateWidget:(BuildContext context, StateBuilderBase oldWidget, TickerProvider ticker)=> myModel.myMethod([context,oldWidget, ticker]), MixinWith : MixinWith.singleTickerProviderStateMixin builder:(BuildContext context, ReactiveModel model) =>MyWidget(), )
final
dispose → void Function(BuildContext context, ReactiveModel<R>? rm, T? mix)?
StateWithMixinBuilder( dispose:(BuildContext context, TickerProvider ticker)=> myModel.dispose([context, ticker]), MixinWith : MixinWith.singleTickerProviderStateMixin builder:(BuildContext context, ReactiveModel model) =>MyWidget(), )
final
hashCode int
The hash code for this object.
no setterinherited
initState → void Function(BuildContext context, ReactiveModel<R>? rm, T? mix)?
StateWithMixinBuilder( initState:(BuildContext context, ReactiveModel model, TickerProvider ticker)=> myModel.init([context, ticker]), MixinWith : MixinWith.singleTickerProviderStateMixin builder:(BuildContext context, ReactiveModel model) =>MyWidget(), )
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mixinWith MixinWith
An enum of Pre-defined mixins (ex: MixinWith.tickerProviderStateMixin)
final
observe ReactiveModel<R> Function()?
StateWithMixinBuilder( models:[myModel1, myModel2,myModel3],//If you want this widget to not rebuild, do not define any model. MixinWith : MixinWith.singleTickerProviderStateMixin builder:(BuildContext context, ReactiveModel model) =>MyWidget(), )
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tag → dynamic
A custom name of your widget. It is used to rebuild this widget from your logic classes.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _State<T, R>
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

automaticKeepAlive<R>({Key? key, dynamic tag, ReactiveModel<R> observe()?, Widget builder(BuildContext context, ReactiveModel<R>? rm)?, Widget builderWithChild(BuildContext context, ReactiveModel<R>? rm, Widget? child)?, Widget? child, void initState(BuildContext context, ReactiveModel<R>? rm)?, void dispose(BuildContext context, ReactiveModel<R>? rm)?, void didChangeDependencies(BuildContext context, ReactiveModel<R>? rm)?, void didUpdateWidget(BuildContext context, StateWithMixinBuilder<AutomaticKeepAliveClientMixin<StatefulWidget>, R> old)?, void afterInitialBuild(BuildContext context, ReactiveModel<R>? rm)?, void afterRebuild(BuildContext context, ReactiveModel<R>? rm)?}) StateWithMixinBuilder<AutomaticKeepAliveClientMixin<StatefulWidget>, R>
StateBuilder mixin with AutomaticKeepAliveClientMixin
singleTickerProvider<R>({Key? key, dynamic tag, ReactiveModel<R> observe()?, Widget builder(BuildContext context, ReactiveModel<R>? rm)?, Widget builderWithChild(BuildContext context, ReactiveModel<R>? rm, Widget? child)?, Widget? child, void initState(BuildContext context, ReactiveModel<R>? rm, SingleTickerProviderStateMixin<StatefulWidget>? ticker)?, void dispose(BuildContext context, ReactiveModel<R>? rm, SingleTickerProviderStateMixin<StatefulWidget>? ticker)?, void didChangeDependencies(BuildContext context, ReactiveModel<R>? rm, SingleTickerProviderStateMixin<StatefulWidget>? ticker)?, void didUpdateWidget(BuildContext context, StateWithMixinBuilder<SingleTickerProviderStateMixin<StatefulWidget>, R> old, SingleTickerProviderStateMixin<StatefulWidget>? ticker)?, void afterInitialBuild(BuildContext context, ReactiveModel<R>? rm)?, void afterRebuild(BuildContext context, ReactiveModel<R>? rm)?}) StateWithMixinBuilder<SingleTickerProviderStateMixin<StatefulWidget>, R>
StateBuilder mixin with SingleTickerProviderStateMixin
tickerProvider<R>({Key? key, dynamic tag, Widget builder(BuildContext context, ReactiveModel<R>? rm)?, Widget builderWithChild(BuildContext context, ReactiveModel<R>? rm, Widget? child)?, Widget? child, ReactiveModel<R> observe()?, void initState(BuildContext context, ReactiveModel<R>? rm, TickerProviderStateMixin<StatefulWidget>? ticker)?, void dispose(BuildContext context, ReactiveModel<R>? rm, TickerProviderStateMixin<StatefulWidget>? ticker)?, void didChangeDependencies(BuildContext context, ReactiveModel<R>? rm, TickerProviderStateMixin<StatefulWidget>? ticker)?, void didUpdateWidget(BuildContext context, StateWithMixinBuilder<TickerProviderStateMixin<StatefulWidget>, R> old, TickerProviderStateMixin<StatefulWidget>? ticker)?, void afterInitialBuild(BuildContext context, ReactiveModel<R>? rm)?, void afterRebuild(BuildContext context, ReactiveModel<R>? rm)?}) StateWithMixinBuilder<TickerProviderStateMixin<StatefulWidget>, R>
StateBuilder mixin with TickerProviderStateMixin
widgetsBindingObserver<R>({Key? key, dynamic tag, ReactiveModel<R> observe()?, Widget builder(BuildContext context, ReactiveModel<R>? rm)?, Widget builderWithChild(BuildContext context, ReactiveModel<R>? rm, Widget? child)?, Widget? child, void initState(BuildContext context, ReactiveModel<R>? rm)?, void dispose(BuildContext context, ReactiveModel<R>? rm)?, void didChangeDependencies(BuildContext context, ReactiveModel<R>? rm)?, void didUpdateWidget(BuildContext context, StateWithMixinBuilder<WidgetsBindingObserver, R> old)?, void afterInitialBuild(BuildContext context, ReactiveModel<R>? rm)?, void afterRebuild(BuildContext context, ReactiveModel<R>? rm)?, void didChangeAppLifecycleState(BuildContext context, AppLifecycleState lifecycleState)?, void didChangeLocales(BuildContext context, List<Locale>? locale)?}) StateWithMixinBuilder<WidgetsBindingObserver, R>
StateBuilder mixin with WidgetsBindingObserver