findElementByResolver method
Returns the CompileElement where resolver
originates from.
May be used to find the correct parent view (in nested views).
Implementation
CompileElement? findElementByResolver(ProviderResolver? resolver) {
// TODO: [ProviderResolver._host] *is* the `CompileElement`.
// We should take this into account during the pipeline refactor.
CompileElement? current = this;
while (current?._providers != resolver) {
current = current!.parent;
}
return current;
}