findInput<T> method Null safety

SMIInput<T>? findInput<T>(
  1. String name
)

Find an input with a specific backing type and a given name.

Implementation

SMIInput<T>? findInput<T>(String name) {
  for (final input in _inputs) {
    if (input._is<T>() && input.name == name) {
      return input as SMIInput<T>;
    }
  }
  return null;
}