setSystemOverlayStyle static method

void setSystemOverlayStyle({
  1. Brightness? statusBarBrightness,
  2. Brightness? statusBarIconBrightness,
  3. Brightness? navigationBarIconBrightness,
  4. Color? statusBarColor,
  5. Color? navigationBarColor,
  6. Color? navigationBarDividerColor,
})

DO THAT:

SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(...));

Implementation

static void setSystemOverlayStyle({
  Brightness? statusBarBrightness,
  Brightness? statusBarIconBrightness,
  Brightness? navigationBarIconBrightness,
  Color? statusBarColor,
  Color? navigationBarColor,
  Color? navigationBarDividerColor,
}) {
  SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
    systemNavigationBarColor: navigationBarColor,
    systemNavigationBarDividerColor: navigationBarDividerColor,
    systemNavigationBarIconBrightness: navigationBarIconBrightness,
    statusBarColor: statusBarColor,
    statusBarBrightness: statusBarBrightness,
    statusBarIconBrightness: statusBarIconBrightness,
  ));
}