Unverified Commit 399cd6a5 authored by pdblasi-google's avatar pdblasi-google Committed by GitHub

Refactors accessibility guidelines to remove the single window assumption. (#122760)

Refactors accessibility guidelines to remove the single window assumption
parent 3dd3c021
......@@ -252,19 +252,17 @@ abstract class WidgetController {
/// The [TestFlutterView] provided by default when testing with
/// [WidgetTester.pumpWidget].
///
/// If the test requires multiple views, it will need to use [viewOf] instead
/// to ensure that the view related to the widget being evaluated is the one
/// that gets updated.
/// 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.
TestFlutterView get view {
assert(platformDispatcher.views.length == 1, 'When testing with multiple views, use `viewOf` instead.');
return platformDispatcher.views.single;
}
TestFlutterView get view => platformDispatcher.implicitView!;
/// Provides access to a [SemanticsController] for testing anything related to
/// the [Semantics] tree.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment