findSMI<T> method

T? findSMI<T>(
  1. String name,
  2. String path
)

Implementation

T? findSMI<T>(String name, String path) {
  final nested = nestedArtboardAtPath(path);
  if (nested != null) {
    if (nested.mountedArtboard is RuntimeMountedArtboard) {
      final runtimeMountedArtboard =
          nested.mountedArtboard as RuntimeMountedArtboard;
      final controller = runtimeMountedArtboard.controller;
      if (controller != null) {
        for (final input in controller.inputs) {
          if (input is T && input.name == name) {
            return input as T;
          }
        }
      }
    }
  }
  return null;
}