didChangePlatformBrightness method
Called when the platform brightness changes.
This method exposes notifications from dart:ui.PlatformDispatcher.onPlatformBrightnessChanged.
See also:
- MediaQuery.platformBrightnessOf, which provides a similar service with less boilerplate.
Implementation
@override
void didChangePlatformBrightness() {
super.didChangePlatformBrightness();
if (_themeManager.appearanceConfig == "system") {
_themeManager.setAppearanceConfig(context);
}
}