MinimumTextContrastGuideline class
A guideline which verifies that all nodes that contribute semantics via text meet minimum contrast levels.
The guidelines are defined by the Web Content Accessibility Guidelines, http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html.
See also:
- AccessibilityGuideline, which provides a general overview of accessibility guidelines and how to use them.
- Inheritance
-
- Object
- AccessibilityGuideline
- MinimumTextContrastGuideline
- Annotations
Constructors
- MinimumTextContrastGuideline()
-
Create a new MinimumTextContrastGuideline.
const
Properties
- description → String
-
A description of the policy restrictions and criteria.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
evaluate(
WidgetTester tester) → Future< Evaluation> -
Evaluate whether the current state of the
tester
conforms to the rule.override -
isNodeOffScreen(
Rect paintBounds, FlutterView window) → bool - Returns if a rectangle of node is off the screen.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shouldSkipNode(
SemanticsData data) → bool - Returns whether node should be skipped.
-
targetContrastRatio(
double? fontSize, {required bool bold}) → double -
Returns the required contrast ratio for the
fontSize
andbold
setting. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- kBoldTextMinimumSize → const int
- The minimum text size for bold text to be considered large for contrast checking.
- kLargeTextMinimumSize → const int
- The minimum text size considered large for contrast checking.
- kMinimumRatioLargeText → const double
- The minimum contrast ratio for large text.
- kMinimumRatioNormalText → const double
- The minimum contrast ratio for normal text.