Quantcast
Channel: User mikyll98 - Stack Overflow
Viewing all articles
Browse latest Browse all 112

Answer by mikyll98 for Flutter: how to set PersistentFooterButtons background?

$
0
0

I'm answering my own question because I found a way to achieve what I needed, but I'm not using persistentFooterButtons anymore, so I think there are more correct answers for this specific thread.


The property bottomNavigationBar doesn't have a hard coded padding, contrary to persistentFooterButtons (as noted by MendelG in the other answer).

Therefore, I can change the background color using a Container, and add the padding myself (inside the container) to obtain the wanted result:

Scaffold(  // ...  bottomNavigationBar: Container(    color: Colors.white,    child: Padding(      padding: const EdgeInsets.all(8.0),      child: Row(        children: [          // ...        ],      ),    ),  ),),

Result

enter image description here


Viewing all articles
Browse latest Browse all 112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>