findWhere<T extends MarkupRenderObject> method
Returns the first render object of type T that satisfies test.
Searches inside groups and, if visitFragments is true, inside fragments.
Implementation
T? findWhere<T extends MarkupRenderObject>(bool Function(T) test, {bool visitFragments = true}) {
for (final node in this) {
if (node is T && test(node)) return node;
if (visitFragments && node is MarkupRenderFragment) {
if (node.children.findWhere<T>(test) case final found?) return found;
}
}
return null;
}