-
public final class RiveBlockServer-driven Rive animation block.
SPEC-070-A E.3 — replaces the stub placeholder with a real RiveAnimationView hosted via AndroidView. Compose-only Rive APIs are still nascent (
RiveAnimationComposable shipped late and depends on the same View under the hood), so we use the battle-tested View directly and wrap it with DisposableEffect to stop the animation + release native resources when the composition leaves the tree (E.4).iOS parity:
packages/appdna-sdk-ios/Sources/AppDNASDK/Core/RiveBlockView.swiftusesRiveViewModel(name:, stateMachineName:, fit:, alignment:)from RiveRuntime. The AndroidRiveAnimationViewmatches that surface —setRiveResource(url, stateMachineName, autoplay)plus input setters mirror the iOSsetInput(_:value:)calls.Boolean and number inputs are propagated from RiveBlock.inputs; trigger inputs (named in RiveBlock.trigger_on_step_complete) are fired by callers (e.g. OnboardingFlowHost) via fireTrigger — we expose the view through a side-effect channel by storing it in remember so the host can reach in.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringrive_urlprivate final Stringartboardprivate final Stringstate_machineprivate final Booleanautoplayprivate final Floatheightprivate final Stringalignmentprivate final Map<String, Object>inputsprivate final Stringtrigger_on_step_complete
-
Method Summary
Modifier and Type Method Description final StringgetRive_url()final StringgetArtboard()final StringgetState_machine()final BooleangetAutoplay()final FloatgetHeight()final StringgetAlignment()final Map<String, Object>getInputs()final StringgetTrigger_on_step_complete()-
-
Method Detail
-
getRive_url
final String getRive_url()
-
getArtboard
final String getArtboard()
-
getState_machine
final String getState_machine()
-
getAutoplay
final Boolean getAutoplay()
-
getAlignment
final String getAlignment()
-
getTrigger_on_step_complete
final String getTrigger_on_step_complete()
-
-
-
-