Atlas class
Atlas data loaded from a .atlas
file and its corresponding .png
files. For each atlas image,
a corresponding Image and Paint is constructed, which are used when rendering a skeleton
that uses this atlas.
Use the static methods fromAsset, fromFile, and fromHttp to load an atlas. Call dispose when the atlas is no longer in use to release its resources.
Properties
-
atlasPagePaints
→ List<
Map< BlendMode, Paint> > -
final
-
atlasPages
→ List<
Image> -
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
-
dispose(
) → void - Disposes the (native) resources of this atlas. The atlas can no longer be used after calling this function. Only the first call to this method will have an effect. Subsequent calls are ignored.
-
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
-
fromAsset(
String atlasFileName, {AssetBundle? bundle}) → Future< Atlas> -
Loads an Atlas from the file
atlasFileName
in the root bundle or the optionally providedbundle
. -
fromFile(
String atlasFileName) → Future< Atlas> -
Loads an Atlas from the file
atlasFileName
. -
fromHttp(
String atlasURL) → Future< Atlas> -
Loads an Atlas from the URL
atlasURL
.