AssetManager class
This class downloads assets over the network.
Assets are resolved relative to assetsDir inside the absolute base
specified by assetBase
(optional).
By default, URLs are relative to the <base>
of the current website.
Constructors
- AssetManager({String assetsDir = _defaultAssetsDir, String? assetBase})
- Initializes AssetManager with paths.
Properties
Methods
-
getAssetUrl(
String asset) → String - Returns the URL to load the asset from, given the asset key.
-
load(
String asset) → Future< ByteData> -
Loads an asset using an
XMLHttpRequest
and returns data as ByteData. -
loadAsset(
String asset) → Future< Object> - Loads an asset and returns the server response.
-
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