LogicLoader class

A widget which can be used to load resources when it's inserted in the tree.

For example, you can use this widget to load data from the repository, the first time this widget builds.

Inheritance

Constructors

LogicLoader({Key? key, List<LogicRef<Loadable>> refs = const <LogicRef<Loadable>>[], LoadableWidgetBuilder? builder, Widget? child})
Creates a LogicLoader which will call the Loadable.load method of all the LogicRefs of the given refs, when it's inserted in the tree.
const

Properties

builder LoadableWidgetBuilder?
The builder that creates a child to display in this widget, which will use the provided loading state to show whether data is being fetched.
final
child Widget?
The widget to pass to builder if it's not null, or the child to directly display in this widget.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
refs List<LogicRef<Loadable>>
Logic references that needs to be loaded when this widget is inserted in the tree.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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