Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter fullscreen app. Getting rid of the blank white space at the bottom of the app on android

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.

image

like image 633
Aasiz Avatar asked Jun 18 '18 20:06

Aasiz


2 Answers

You can set resizeToAvoidBottomPadding to false on Scaffold

Scaffold(
  resizeToAvoidBottomPadding: false,
  appBar: new AppBar(),
);
like image 148
Rémi Rousselet Avatar answered Oct 08 '22 02:10

Rémi Rousselet


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
    )
 }
like image 4
gandalivs Avatar answered Oct 08 '22 01:10

gandalivs