LoaderController class abstract
A controller for the loader.
You can access the controller in the descending tree with:
final controller = LoaderController.of(context);
Constructors
Properties
- data → dynamic
-
The data that is loaded successfully by the loader. This data will not
be cleared when load is called.
no setter
- error → dynamic
-
The error that has happened while loading data. This data will be cleared
when load is called.
no setter
- errorStacktrace → StackTrace?
-
Stacktrace of the error that has happened while loading data. This data
will be cleared when load is called.
no setter
- hasError → bool
-
Whether there has been an error while loading data.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → LoaderState
-
Current state of the loader.
no setter
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 nonexistent 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.