viewOf method

TestFlutterView viewOf(
  1. 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:


TestFlutterView viewOf(Finder finder) {
  final View view = firstWidget<View>(
      of: finder,
      matching: find.byType(View),

  return view.view as TestFlutterView;