Flutter. Combinations of using BottomAppBar with FloatingActionButton

Artem Diashkin
Apr 19, 2020 · 2 min read

All versions are used as properties of Scaffold widget

Version 1

bottomNavigationBar: BottomAppBar(
color: Colors.blueGrey,
shape: const CircularNotchedRectangle(),
child: Container(
height: 60.0,
),
),
floatingActionButton: FloatingActionButton(
backgroundColor: Colors.blueGrey,
onPressed: null,
child: Icon(Icons.account_circle),
),

Version 2

bottomNavigationBar: BottomAppBar(
color: Colors.blueGrey,
shape: const CircularNotchedRectangle(),
child: Container(
height: 60.0,
),
),
floatingActionButton: FloatingActionButton(
backgroundColor: Colors.blueGrey,
onPressed: null,
child: Icon(Icons.account_circle),
),
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,

Version 3

Changing only floatingActionButtonLocation property

FloatingActionButtonLocation.centerFloat

Version 4

Changing only floatingActionButtonLocation property

FloatingActionButtonLocation.centerDocked

Version 5

Wrap with padding OR notchMargin property

bottomNavigationBar: BottomAppBar(
notchMargin: 40.0, << === OR
color: Colors.blueGrey,
shape: const CircularNotchedRectangle(),
child: Container(
height: 60.0,
),
),
floatingActionButton: Padding( << == OR
padding: const EdgeInsets.all(40.0),
child: FloatingActionButton(
backgroundColor: Colors.blueGrey,
onPressed: null,
child: Icon(Icons.account_circle),
),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,

Version 6

bottomNavigationBar: BottomAppBar(
color: Colors.blueGrey,
shape: CircularNotchedRectangle(),
child: Container(
height: 50.0,
),
),
floatingActionButton: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
FloatingActionButton(
backgroundColor: Colors.blueGrey,
onPressed: () {},
child: Icon(Icons.account_circle),
heroTag: null,
),
FloatingActionButton(
backgroundColor: Colors.blueGrey,
onPressed: () {},
child: Icon(Icons.account_circle),
heroTag: null,
),
FloatingActionButton(
backgroundColor: Colors.blueGrey,
onPressed: () {},
child: Icon(Icons.access_alarm),
heroTag: null,
),
],
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,

Version 7

BottomIcon widget

MainApp widget

LITSLINK Mobile Development

LITSLINK’s team is sharing their experience regarding Mobile development

Artem Diashkin

Written by

Java, Spring, Node.js, AdonisJs, React.js and Flutter developer

LITSLINK Mobile Development

Hands-on up to date experience sharing of the most skilled & talented software developers right here, right now. Subscribe to learn & understand more about the Software World.

Artem Diashkin

Written by

Java, Spring, Node.js, AdonisJs, React.js and Flutter developer

LITSLINK Mobile Development

Hands-on up to date experience sharing of the most skilled & talented software developers right here, right now. Subscribe to learn & understand more about the Software World.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store