rememberRiveFile

Loads a RiveFile from the given source.

The lifetime of the RiveFile is managed by this composable. It will release the resources allocated to the file, including its reference to riveWorker, when it falls out of scope.

Return

The Result of loading the Rive file, which can be either loading, error, or success with the RiveFile.

Parameters

source

The source of the Rive file, which can be a byte array or a raw resource ID.

riveWorker

The Rive worker that owns the file.