handlePlatformBrightnessChanged method
Called when the platform brightness changes.
The current platform brightness can be queried from a Flutter binding or from a MediaQuery widget. The latter is preferred from widgets because it causes the widget to be automatically rebuilt when the brightness changes.
Querying MediaQuery.platformBrightnessOf directly. Preferred.
link
final Brightness brightness = MediaQuery.platformBrightnessOf(context);
Querying PlatformDispatcher.platformBrightness.
link
final Brightness brightness = WidgetsBinding.instance.platformDispatcher.platformBrightness;
Implementation
@protected
void handlePlatformBrightnessChanged() { }