I used SystemChrome.setEnabledSystemUIOverlays([]);
to make my flutter app full screen.
The status bar is gone for good, but I get this white space at the bottom where the nav bar used to be.
I used SystemChrome.setEnabledSystemUIOverlays([]);
to make my flutter app full screen.
The status bar is gone for good, but I get this white space at the bottom where the nav bar used to be.
You can set resizeToAvoidBottomPadding
to false
on Scaffold
Scaffold(
resizeToAvoidBottomPadding: false,
appBar: new AppBar(),
);
this code work for me, thx
@override
Widget build(BuildContext context) {
SystemChrome.setEnabledSystemUIOverlays([]);
return Scaffold(
resizeToAvoidBottomPadding: false
)
}
resizeToAvoidBottomPadding has been deprecated and now you have to use resizeToAvoidBottomInset
Updated code below:
@override
Widget build(BuildContext context) {
SystemChrome.setEnabledSystemUIOverlays([]);
return Scaffold(
resizeToAvoidBottomInset: false
)
}
I used resizeToAvoidBottomPadding = false but sometimes there's white padding at where navigation bar is. It's inconsistent, sometime it's shown, sometimes it's not
use SystemChrome.setEnabledSystemUIOverlays([]); in your widget,it will work perfect:
@override
Widget build(BuildContext context) {
// To make this screen full screen.
// It will hide status bar and notch.
SystemChrome.setEnabledSystemUIOverlays([]);
// full screen image for splash screen.
return Container(
child: new Image.asset('assets/splash.png', fit: BoxFit.fill));
}
}
and remember to import this
import 'package:flutter/services.dart';