MinimumTextContrastGuideline class Null safety
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.
read-onlyoverride
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
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 non-existent 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.
14
- kLargeTextMinimumSize → const int
-
The minimum text size considered large for contrast checking.
18
- kMinimumRatioLargeText → const double
-
The minimum contrast ratio for large text.
3.0
- kMinimumRatioNormalText → const double
-
The minimum contrast ratio for normal text.
4.5