PreloadRequest class
A single Preload.load in flight.
It carries progress, it notifies its listeners as assets land, and it completes as a Future. Dispose it once you are done with it:
final request = Ignis.preload.load(manifest: true);
// ...drive a progress bar from `request`...
await request;
request.dispose();
- Inheritance
-
- Object
- ChangeNotifier
- PreloadRequest
- Implemented types
-
- Future<
void>
- Future<
- Available extensions
Properties
- accepted → int
-
How many of them at least one loader accepted.
no setter
- completed → int
-
How many of them have finished.
no setter
- done → bool
-
Whether the load has finished, successfully or not.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- progress → double
-
How far along the load is, from 0 to 1.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
toJS
→ JSPromise<
T> -
Available on Future<
A JSPromise that either resolves with the result of the completed Future or rejects with an object that contains its error.T> , provided by the FutureOfJSAnyToJSPromise extensionno setter -
toJS
→ JSPromise<
JSAny?> -
Available on Future<
A JSPromise that either resolves once this Future completes or rejects with an object that contains its error.void> , provided by the FutureOfVoidToJSPromise extensionno setter - total → int
-
How many assets this load covers. Grows once a manifest is read.
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
asStream(
) → Stream< void> -
Creates a Stream containing the result of this future.
override
-
catchError(
Function onError, {bool test(Object)?}) → Future< void> -
Handles errors emitted by this Future.
override
-
dispose(
) → void -
Discards any resources used by the object.
override
-
ignore(
) → void -
Available on Future<
Completely ignores this future and its result.T> , provided by the FutureExtensions extension -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
onError<
E extends Object> (FutureOr< T> handleError(E error, StackTrace stackTrace), {bool test(E error)?}) → Future<T> -
Available on Future<
Handles errors on this future.T> , provided by the FutureExtensions extension -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
then<
R> (FutureOr< R> onValue(void), {Function? onError}) → Future<R> -
Register callbacks to be called when this future completes.
override
-
timeout(
Duration limit, {FutureOr< void> onTimeout()?}) → Future<void> -
Stop waiting for this future after
timeLimithas passed.override -
toString(
) → String -
A string representation of this object.
inherited
-
whenComplete(
FutureOr< void> action()) → Future<void> -
Registers a function to be called when this future completes.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited