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

assetsDir String
The directory containing the assets.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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