platformBrightness method

Brightness platformBrightness({
  1. required BuildContext context,
})

Implementation

Brightness platformBrightness({
  required BuildContext context,
}) {
  if (generalLibFlutterApp.themeMode == ThemeMode.dark) {
    return Brightness.dark;
  }
  if (generalLibFlutterApp.themeMode == ThemeMode.light) {
    return Brightness.light;
  }
  return context.mediaQueryData.platformBrightness;
}