highContrast property

bool highContrast
final

Whether the platform is requesting a high contrast between foreground and background content.

On iOS, this corresponds to the "Increase Contrast" setting in Settings -> Accessibility. On Android, this corresponds to the "High contrast text" or similar accessibility settings.

This flag indicates that the operating system is already performing high-contrast adjustments or expects the application to adjust its color palette to meet higher accessibility standards.

Changing this value manually in a MediaQuery override will not automatically trigger a theme change in MaterialApp. Instead, MaterialApp uses this value to decide whether to use MaterialApp.highContrastTheme or MaterialApp.highContrastDarkTheme.

This flag is currently only updated on iOS devices running iOS 13+ and Android devices running API 34+.

Implementation

///
/// This flag is currently only updated on iOS devices running iOS 13+
/// and Android devices running API 34+.
final bool highContrast;