Trying to set app as full screen using SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
it hides the bottom navigation bar but is inconsistent sometimes a white space appears at the bottom, and the top status bar part is just a black space always 
void main() async {
await setupServiceLocator();
WidgetsFlutterBinding.ensureInitialized();
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
runApp(ProviderScope(child: DevicePreview(
enabled:false,//!kReleaseMode,
builder: (context) => MyApp())));
}
how to resolve this ? already tried <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item> in the styles.xml file but no change.
You can try my code, it is worked for me https://i.stack.imgur.com/YfE6y.png