FakeAccessibilityFeatures class Null safety

Test version of AccessibilityFeatures in which specific features may be set to arbitrary values.

By default, all features are disabled. For an instance where all the features are enabled, consider the FakeAccessibilityFeatures.allOn constant.

Implemented types
Annotations

Constructors

FakeAccessibilityFeatures({bool accessibleNavigation = false, bool invertColors = false, bool disableAnimations = false, bool boldText = false, bool reduceMotion = false, bool highContrast = false})
Creates a test instance of AccessibilityFeatures.
const

Properties

accessibleNavigation bool
Whether there is a running accessibility service which is changing the interaction model of the device.
final
boldText bool
The platform is requesting that text be rendered at a bold font weight.
final
disableAnimations bool
The platform is requesting that animations be disabled or simplified.
final
hashCode int
The hash code for this object.
read-onlyoverride
highContrast bool
The platform is requesting that UI be rendered with darker colors.
final
invertColors bool
The platform is inverting the colors of the application.
final
onOffSwitchLabels bool
The platform is requesting to show on/off labels inside switches.
read-onlyinherited
reduceMotion bool
The platform is requesting that certain animations be simplified and parallax effects removed.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
This gives us some grace time when the dart:ui side adds something to AccessibilityFeatures, and makes things easier when we do rolls to give us time to catch up.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Constants

allOn → const FakeAccessibilityFeatures
An instance of AccessibilityFeatures where all the features are enabled.
FakeAccessibilityFeatures(accessibleNavigation: true, invertColors: true, disableAnimations: true, boldText: true, reduceMotion: true, highContrast: true)