0

I have tried like this:

return Semantics(
  explicitChildNodes: true,
  container: true,
  child: AnnotatedRegion<SystemUiOverlayStyle>(
    value: widget.statusBarTextIsBlack
        ? SystemUiOverlayStyle.dark
        : SystemUiOverlayStyle.light,
    child: Semantics(
      explicitChildNodes: true,
      child: MyPage(),
    ),
  ),
);

or do this in func build

SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light.copyWith(
  statusBarBrightness: Brightness.light,
));

but it useless.I dont know how to solve it.............

luckysmg
  • 187
  • 1
  • 9

1 Answers1

0

Wrap your scaffold with SafeArea

 @override
  Widget build(BuildContext context) {
    SizeConfig().init(context);
    SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
      systemNavigationBarColor: CustomColors.background, //navigation bar color
      statusBarIconBrightness: Brightness.dark,
      statusBarColor: CustomColors.background, // status bar color
    ));
    return Scaffold(
      body: Container( 
Jay Gadariya
  • 1,823
  • 7
  • 25