Accessibility design tokens for the design system.
Provides minimum touch targets, focus ring styles, and semantic helpers to ensure WCAG AA compliance across all components.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
clampTextScale(
double textScaleFactor) → double -
Clamps
textScaleFactorto the allowed range. -
contrastRatio(
Color foreground, Color background) → double - Returns the luminance contrast ratio between two colors.
-
meetsAA(
Color foreground, Color background) → bool -
Whether
foregroundonbackgroundmeets WCAG AA for normal text. -
meetsAAA(
Color foreground, Color background) → bool -
Whether
foregroundonbackgroundmeets WCAG AAA for normal text.
Constants
- comfortableTouchTarget → const double
- Recommended comfortable touch target.
- contrastRatioAA → const double
- WCAG AA minimum contrast ratio for normal text.
- contrastRatioAAA → const double
- WCAG AAA minimum contrast ratio for normal text.
- contrastRatioAAALarge → const double
- WCAG AAA minimum contrast ratio for large text.
- contrastRatioAALarge → const double
- WCAG AA minimum contrast ratio for large text (18pt+ or 14pt bold).
- focusRingColorDefault → const Color
- Default focus ring color is resolved from context at build time.
- focusRingOffset → const double
- Focus ring offset from the focused widget.
- focusRingRadius → const double
- Focus ring corner radius.
- focusRingWidth → const double
- Focus ring width.
- maxTextScaleFactor → const double
- Maximum text scale factor allowed before clamping.
- minTextScaleFactor → const double
- Minimum text scale factor allowed.
- minTouchTarget → const double
- Minimum touch target width in logical pixels (WCAG 2.5.5).
- reducedMotionDuration → const Duration
- Duration for reduced-motion mode (nearly instant).
- smallTouchTarget → const double
- Small touch target (icon buttons in dense areas).