getBrightness function
Private API to get the current Brightness (light or dark). It uses a method that is Cupertino-compliant.
Implementation
Brightness getBrightness(BuildContext context) {
return MediaQuery.platformBrightnessOf(context);
}
Private API to get the current Brightness (light or dark). It uses a method that is Cupertino-compliant.
Brightness getBrightness(BuildContext context) {
return MediaQuery.platformBrightnessOf(context);
}