getComponentWhereOrNull<T> method
Find a component that matches the given predicate.
Implementation
T? getComponentWhereOrNull<T>(bool Function(Component) callback) {
for (final component in _components) {
if (component is T && callback(component)) {
return component as T;
}
}
return null;
}