meetsGuideline function

AsyncMatcher meetsGuideline (
  1. AccessibilityGuideline guideline
)

Asserts that the currently rendered widget meets the provided accessibility guideline.

This matcher requires the result to be awaited and for semantics to be enabled first.

Sample code

final SemanticsHandle handle = tester.ensureSemantics();
await meetsGuideline(tester, meetsGuideline(textContrastGuideline));
handle.dispose();

Supported accessibility guidelines:

Implementation

AsyncMatcher meetsGuideline(AccessibilityGuideline guideline) {
  return _MatchesAccessibilityGuideline(guideline);
}