LoadingManager class

Handles and keeps track of loaded and pending data. A default global instance of this class is created and used by loaders if not supplied manually - see DefaultLoadingManager.

In general that should be sufficient, however there are times when it can be useful to have separate loaders - for example if you want to show separate loading bars for objects and textures.

Constructors

LoadingManager.new([void onLoad()?, void onProgress(String, int, int)?, void onError(String)?])
onLoad — (optional) this function will be called when all loaders are done.

Properties

handlers List
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isLoading bool
getter/setter pair
itemsLoaded int
getter/setter pair
itemsTotal int
getter/setter pair
onError ↔ void Function(String)?
getter/setter pair
onLoad ↔ void Function()?
getter/setter pair
onProgress ↔ void Function(String, int, int)?
getter/setter pair
onStart ↔ void Function(String, int, int)?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
urlModifier String Function(String)?
getter/setter pair

Methods

addHandler(RegExp regex, Loader loader) LoadingManager
regex — A regular expression.
getHandler(String file) Loader?
file — The file path.
itemEnd(String url) → void
url — the loaded url
itemError(String url) → void
url — the loaded url
itemStart(String url) → void
url — the url to load
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeHandler(RegExp regex) LoadingManager
regex — A regular expression.
resolveURL(String url) String
url — the url to load
setURLModifier(String transform(String)?) LoadingManager
callback — URL modifier callback. Called with url argument, and must return resolvedURL.
toString() String
A string representation of this object.
inherited

Operators

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