AccessibilityGuideline class Null safety

An accessibility guideline describes a recommendation an application should meet to be considered accessible.

Use meetsGuideline matcher to test whether a screen meets the accessibility guideline.

This sample demonstrates how to run an accessibility guideline in a unit test against a single screen.
testWidgets('HomePage meets androidTapTargetGuideline', (WidgetTester tester) async {
  final SemanticsHandle handle = tester.ensureSemantics();
  await tester.pumpWidget(const MaterialApp(home: HomePage()));
  await expectLater(tester, meetsGuideline(androidTapTargetGuideline));
  handle.dispose();
});

See also:

Implementers

Constructors

AccessibilityGuideline()
A const constructor allows subclasses to be const.
const

Properties

description String
A description of the policy restrictions and criteria.
read-only
hashCode int
The hash code for this object.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

evaluate(WidgetTester tester) FutureOr<Evaluation>
Evaluate whether the current state of the tester conforms to the rule.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited