Quantcast
Viewing all articles
Browse latest Browse all 102

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

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

Image may be NSFW.
Clik here to view.
enter image description here


Viewing all articles
Browse latest Browse all 102

Trending Articles