from Source
Loads a RiveFile from the given source.
⚠️ The lifetime of the RiveFile is managed by the caller. Make sure to call close when you are done with the file to release its resources. The returned file holds a reference to riveWorker, so closing it is required before the worker can fully release memory associated with this file.
Return
The loaded Rive file, or an error if loading failed. The Loading state is not used here since the loading is performed in a suspend function.
Parameters
source
The source of the Rive file.
rive Worker
The Rive worker that owns the file.