LiteState<T extends LiteStateController> class

Inheritance

Constructors

LiteState({required LiteStateBuilder<T> builder, LiteStateController<T>? controller, ValueChanged<T>? onReady, bool isSliver = false, String? builderName, bool useIsolatedController = false, Key? key})
builder a function that will be called every time you call rebuild in your controller controller if you don't need a persistent controller pass a new instance of controller here and it will be disposed as soon as your LiteState widget is disposed onReady this callback is guaranteed to be called after LiteState has completed initialization and local storage already can be used builderName allows to build only a specific builder for example, you have a view widgets wrapped in LiteState in the same page if you pass a name to a lite state builder, you can then use it in this method to rebuild a particular one. This might be very useful with complex UIs
const

Properties

builder LiteStateBuilder<T>
final
builderName String?
builderName allows to build only a specific builder for example, you have a view widgets wrapped in LiteState in the same page if you pass a name to a lite state builder, you can then use it in this method to rebuild a particular one. This might be very useful with complex UIs.
final
controller LiteStateController<T>?
final
hashCode int
The hash code for this object.
no setterinherited
isSliver bool
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onReady ValueChanged<T>?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useIsolatedController bool
useIsolatedController can be useful if you need to use the same controller type for many widgets but the controller instances must be different. In this case pass an instance of the controller and set useIsolatedController to true. If it's set to true but a controller is not provided, you will get an exception. IMPORTANT: it it's set to true, then the controller is not available via findController and cannot be disposed of manually. It's completely bound to the instance of LiteState
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<LiteState<LiteStateController>>
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, int wrapWidth = 65}) 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