findElement<T> function
Finds the first Element in the provided context
that matches the provided compare
function.
Implementation
Element? findElement<T>(BuildContext context, bool Function(T) compare) {
Element? element;
context.visitChildElements((Element e) => element = e);
return _findByElement(element!, compare);
}