firstRenderObject<T extends RenderObject> method
- FinderBase<
Element> finder
The render object of the first matching widget according to a depth-first pre-order traversal of the widget tree.
Throws a StateError if finder
is empty.
- Use renderObject if you only expect to match one render object.
Implementation
T firstRenderObject<T extends RenderObject>(finders.FinderBase<Element> finder) {
TestAsyncUtils.guardSync();
return finder.evaluate().first.renderObject! as T;
}