I try to use SystemChrome.setEnabledSystemUIOverlays([]);
to use full screen mode in flutter. It works but the container seems to not cover the whole screen. It's like it moved up to cover the system bar like the image below, leaving some spaces at the bottom. How to solve this?
My codes are:
class MainPage extends StatefulWidget {
_MainPageState createState() => _MainPageState();
}
class _MainPageState extends State<MainPage> {
@override
Widget build(BuildContext context) {
SystemChrome.setEnabledSystemUIOverlays([]);
return MaterialApp(
title: 'Flutter Gradient Demo',
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: Container(
decoration: BoxDecoration(gradient: radialAppBackground)),
),
));
}
}