SystemChrome.setSystemUIOverlayStyle doesn't work on iOs

1.4k views Asked by At

By running this code, I have 2 different outcomes for Android and iOs. For Android everything works as expected, but for the iOs it's ignored. I don't get any errors or such.

class MyMaterialApp extends StatefulWidget {
  const MyMaterialApp({Key key}) : super(key: key);

  @override
  _MyMaterialAppState createState() => _MyMaterialAppState();
}

class _MyMaterialAppState extends State<MyMaterialApp> {
  @override
  Widget build(BuildContext context) {
    SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
      statusBarColor: Colors.blue,
      statusBarIconBrightness: Brightness.dark,
      systemNavigationBarColor: Colors.blue,
      systemNavigationBarIconBrightness: Brightness.dark,
    ));
    return MaterialApp()
}
}

iPhone 11 emulator: iPhone 11 emulator

Samsung s10e device: Samsung s10e device

Does anyone have any idea why this is happening? Thanks!

0

There are 0 answers