Fix missing API in runtime mounted artboard

Fixing errors caused by merging this PR: https://github.com/rive-app/rive/pull/7310

Diffs=
e103006c8 Fix missing API in runtime mounted artboard (#7403)

Co-authored-by: Philip Chung <philterdesign@gmail.com>
This commit is contained in:
philter
2024-06-11 05:47:11 +00:00
parent 42665e4933
commit fc13a2063e
3 changed files with 6 additions and 3 deletions

View File

@ -1 +1 @@
097b68f5616951d83b0c5b28345e6bfc9f0b1a5b
e103006c8fae9308598e00891980fd464edf61a2

View File

@ -50,8 +50,8 @@ extension ArtboardRuntimeExtensions on Artboard {
if (nested.mountedArtboard is RuntimeMountedArtboard) {
final runtimeMountedArtboard =
nested.mountedArtboard as RuntimeMountedArtboard;
final controller = runtimeMountedArtboard.controller;
if (controller != null) {
final controllers = runtimeMountedArtboard.controllers;
for (final controller in controllers) {
for (final input in controller.inputs) {
if (input is T && input.name == name) {
return input as T;

View File

@ -19,6 +19,9 @@ class RuntimeMountedArtboard extends MountedArtboard {
final Set<RuntimeEventReporter> _runtimeEventListeners = {};
Size originalArtboardInstanceSize = const Size(0, 0);
Set<StateMachineController> get controllers =>
_runtimeEventListeners.whereType<StateMachineController>().toSet();
// The callback used for bubbling events up from nested artboards
Function(Event, NestedArtboard)? eventCallback;