RiveFile class

Encapsulates a RiveFile and provides access to the list of Artboard objects it contains.

Constructors

RiveFile.import(ByteData bytes, {FileAssetLoader? assetLoader, ObjectGenerator? objectGenerator, bool loadCdnAssets = true})
Imports a Rive file from an array of bytes.
factory

Properties

artboards List<Artboard>
Returns all artboards in the file
no setter
hashCode int
The hash code for this object.
no setterinherited
Contains the RiveFile's version information.
final
mainArtboard Artboard
Returns the first (main) artboard
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

artboardByName(String name) Artboard?
Returns an artboard from the specified name, or null if no artboard with that name exists in the 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

Static Properties

indexToField List<CoreFieldType<Object>>
final

Static Methods

asset(String bundleKey, {AssetBundle? bundle, FileAssetLoader? assetLoader, bool loadCdnAssets = true, ObjectGenerator? objectGenerator}) Future<RiveFile>
Imports a Rive file from an asset bundle.
file(String path, {FileAssetLoader? assetLoader, bool loadCdnAssets = true, ObjectGenerator? objectGenerator}) Future<RiveFile>
Imports a Rive file from local path
initialize() Future<void>
Initialize Rive's text, audio, and layout engines.
initializeText() Future<void>
Initialize Rive's text engine if it hasn't been yet.
needsTextRuntime(ByteData bytes) bool
network(String url, {Map<String, String>? headers, FileAssetLoader? assetLoader, bool loadCdnAssets = true, ObjectGenerator? objectGenerator}) Future<RiveFile>
Imports a Rive file from a url over HTTP.