-
public final class ArtboardKt
-
-
Method Summary
Modifier and Type Method Description final static ArtboardrememberArtboard(RiveFile file, String artboardName)Creates an Artboard from the given RiveFile. final static Result<Artboard>rememberArtboardResult(RiveFile file, String artboardName)Creates an Artboard from file and exposes its creation state. -
-
Method Detail
-
rememberArtboard
@Deprecated(message = Use rememberArtboardResult. This implementation will be removed in 12.0, when rememberArtboardResult will be renamed to rememberArtboard and return a Result.)@Composable() final static Artboard rememberArtboard(RiveFile file, String artboardName)
Creates an Artboard from the given RiveFile.
The lifetime of the artboard is managed by this composable. It will delete the artboard when it falls out of scope.
- Parameters:
file- The RiveFile to instantiate the artboard from.artboardName- The name of the artboard to load.
-
rememberArtboardResult
@Composable() final static Result<Artboard> rememberArtboardResult(RiveFile file, String artboardName)
Creates an Artboard from file and exposes its creation state.
The lifetime of a successfully created artboard is managed by this composable. It will delete the artboard when it falls out of scope.
This is the replacement for rememberArtboard; its temporary name will become
rememberArtboardin 12.0 when the unconfirmed API is removed.- Parameters:
file- The RiveFile to instantiate the artboard from.artboardName- The name of the artboard to load.
-
-
-
-