firstChild<T extends Component> method

T? firstChild<T extends Component>()
inherited

Returns the first child that matches the given type T, or null if there are no such children.

Implementation

T? firstChild<T extends Component>() {
  return children.whereType<T>().firstOrNull;
}