LoaderController class Null safety

A controller for the loader.

You can access the controller in the descending tree with:

final controller = LoaderController.of(context);

Constructors

LoaderController()

Properties

data → dynamic
The data that is loaded successfully by the loader. This data will not be cleared when load is called.
read-only
error → dynamic
The error that has happened while loading data. This data will be cleared when load is called.
read-only
errorStacktrace StackTrace?
Stacktrace of the error that has happened while loading data. This data will be cleared when load is called.
read-only
hasError bool
Whether there has been an error while loading data.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
state LoaderState
Current state of the loader.
read-only

Methods

load([Future loader()]) Future
Load the resource. If the resource is already loading, the call will return immediately with null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

of(BuildContext? context) LoaderController?
Retrieves the LoaderController in the closest ancestor element.