1

Now I am running the latest stable 1.12.13+hotfix.5

I need complete full screen as I phone in an android flutter.

enter image description here

enter image description here

Is it possible in flutter? We can show a lot of the app such as an android setting app, contacts, etc.....

enter image description here

Barbora
  • 921
  • 1
  • 6
  • 11

3 Answers3

0

You can do that by adding this code snippet to your build method

SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
      systemNavigationBarColor: Colors.transparent);
Agshin Huseynov
  • 170
  • 3
  • 13
-1

There's a property in BottomNavigationBar called "backgroundColor", which you can use Colors.transparent to make it like the pictures. But, there are two more tricks:

  • You have to change BottomNavigationBar type to BottomNavigationBar.fixed;
  • You have to change the elevation, since it'll be a large "shadow" where the color should be.

Code example:

bottomNavigationBar: BottomNavigationBar(
          type: BottomNavigationBarType.fixed,
          backgroundColor: Colors.transparent,
          elevation: 0,  

And if You want to have the shifting effect on icons, declare a color to each one.

-1

I've tried this but with the App Bar where it is transparent, but the issue is that these widgets still hold their height once placed inside the scaffold. I assume it'll be the same case with the BotttomNavigationBar, so in this case, you can add it to a Stack (this is how I did it), so it does appear on top of your content and it does reflect its transparency, as follows:

Scaffold(
      body: Container(
          color: Colors.red,
          child: Stack(children: <Widget>[
            Align(
                alignment: Alignment.bottomCenter,
                child: BottomNavigationBar(
                    elevation: 0,
                    backgroundColor: Colors.transparent,
                    items: const <BottomNavigationBarItem>[
                      BottomNavigationBarItem(
                        icon: Icon(Icons.home),
                        title: Text('Home'),
                      ),
                      BottomNavigationBarItem(
                        icon: Icon(Icons.business),
                        title: Text('Business'),
                      ),
                      BottomNavigationBarItem(
                        icon: Icon(Icons.school),
                        title: Text('School'),
                      ),
                    ],
                    currentIndex: 0,
                    selectedItemColor: Colors.amber[800])),
            Center(child: Text('hello'))
          ])))

You will notice that the bottom navigation bar will show red (because it is transparent and will show the parent's color (Container color of red).

Roman Jaquez
  • 2,499
  • 1
  • 14
  • 7