-
Notifications
You must be signed in to change notification settings - Fork 228
Open
Description
Hi,
In version 0.13.20, I was able to change the stroke color at runtime using the following snippet:
RiveAnimation.asset(
riveAsset.src,
artboard: riveAsset.artboard,
onInit: (Artboard artboard) {
final StateMachineController controller = RiveUtils.getController(
artboard,
stateMachine: riveAsset.stateMachineName,
);
artboard.forEachComponent((child) {
if (child is Stroke) {
child.paint.color = Theme.of(context).colorScheme.primary;
}
});
riveAsset.input = controller.findSMI("active");
},
)
After upgrading to 0.14.0, I can’t find a way to achieve the same behavior. I checked the documentation and source code but couldn’t locate an equivalent approach.
Question:
Is there a supported way to change stroke color at runtime in version 0.14.0 or later? If not, is there an alternative recommended approach?
Metadata
Metadata
Assignees
Labels
No labels