viewOf method
- Finder finder
Finds the TestFlutterView that is the closest ancestor of the widget
found by finder
.
TestFlutterView can be used to modify view specific properties for testing.
See also:
- view which returns the TestFlutterView used when only a single view is being used.
Implementation
TestFlutterView viewOf(Finder finder) {
final View view = firstWidget<View>(
find.ancestor(
of: finder,
matching: find.byType(View),
)
);
return view.view as TestFlutterView;
}