diff --git a/lib/src/rive_core/artboard.dart b/lib/src/rive_core/artboard.dart index 68fe552f..06050dc7 100644 --- a/lib/src/rive_core/artboard.dart +++ b/lib/src/rive_core/artboard.dart @@ -110,6 +110,14 @@ class Artboard extends ArtboardBase with ShapePaintContainer { return null; } + /// Find all components of a specific type with a specific name. + List components(String name) { + return _components + .forEach((component is T && component.name == name)) + .map((component) => component as T) + .toList(); + } + @override Artboard get artboard => this;