Is there a highContrastThemeMode in flutter?

Viewed 22

I can't find the equivalent to 'themeMode' for high contrast in Flutter, is it no such property to switch between for example 'darkTheme' and 'highContrastDarkTheme' in the same way as switching between 'theme' and 'darkTheme'.

themeMode: appThemeState.isDarkModeEnabled ? ThemeMode.dark : ThemeMode.light

(I want the user in the app to be able to locally activate high contrast without having to have it from the system settings)

return MaterialApp.router(
debugShowCheckedModeBanner: false,
themeMode: appThemeState.isDarkModeEnabled ? ThemeMode.dark : ThemeMode.light,
theme: lightTheme(),
highContrastTheme: highContrastlightTheme(),
darkTheme: darkTheme(),
highContrastDarkTheme: highContrastDarkTheme(),

what I'm looking for is: contrastMode (but I find no such property)

If there is no corresponding property, how do you work around it? (preferably in flutter and not platform specific)

0 Answers
Related