getBrightness function

Brightness getBrightness(
  1. BuildContext context
)

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);
}