accessibility_test
library
Functions
-
calculateContrast(Color backgroundColor, Color foregroundColor)
→ num
-
Calculates contrast ratio of given
backgroundColor
and foregroundColor
.
-
contrastTest(dynamic description, Color backgroundColor, Color foregroundColor, {ReadabilityLevel readabilityLevel = ReadabilityLevel.normal, dynamic tags})
→ void
-
Creates a new contrast test case with the given
description
.
-
doesMatchMinContrastRatio(num ratio, {ReadabilityLevel readabilityLevel = ReadabilityLevel.normal})
→ bool
-
Check whether given contrast
ratio
meet the minimum required value
for given readabilityLevel
.
-
runContrastTest(Color backgroundColor, Color foregroundColor, {ReadabilityLevel readabilityLevel = ReadabilityLevel.normal})
→ void
-
Checks if given
backgroundColor
and foregroundColor
meet minimum
contrast ratio value for given readabilityLevel
.
-
runThemeTest(ThemeData themeData, {ThemeAccessibilityLevel accessibilityLevel = ThemeAccessibilityLevel.normal})
→ void
-
Scans through given
themeData
, looking for insufficient contrast values
between text and background colors.
-
themeTest(dynamic description, ThemeData themeData, {ThemeAccessibilityLevel accessibilityLevel = ThemeAccessibilityLevel.normal, dynamic tags})
→ void
-
Creates a new theme test case with the given
description
.