view property

TestFlutterView get view

The TestFlutterView provided by default when testing with WidgetTester.pumpWidget.

If the test uses multiple views, this will return the view that is painted into by WidgetTester.pumpWidget. If a different view needs to be accessed use viewOf to ensure that the view related to the widget being evaluated is the one that gets updated.

See also:

  • viewOf, which can find a TestFlutterView related to a given finder. This is how to modify view properties for testing when dealing with multiple views.

Implementation

TestFlutterView get view => platformDispatcher.implicitView!;