FileLoader class
A class that loads a Rive file from an asset, URL, or file.
To be used with RiveWidgetBuilder.
- The riveFactory parameter is the Rive factory to use to decode the Rive file, and determines the desired renderer to use.
This class caches the loaded file, and returns the same file instance for subsequent calls to file.
Constructors
- FileLoader.fromAsset(String asset, {required Factory riveFactory})
- A class that loads a Rive file from an asset, URL, or file.
- FileLoader.fromFile(File file, {required Factory riveFactory})
- A class that loads a Rive file from an asset, URL, or file.
- FileLoader.fromUrl(String url, {required Factory riveFactory})
- A class that loads a Rive file from an asset, URL, or file.
Properties
- fileSync → File?
-
Returns the file synchronously if it's already available.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFileAvailable → bool
-
Returns whether the file is currently available synchronously.
no setter
- riveFactory → Factory
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void -
file(
) → Future< File?> -
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