Skip to content

Instantly share code, notes, and snippets.

@Rahiche
Created December 19, 2018 21:14
Show Gist options
  • Save Rahiche/326b1da4e53a67589316afd75fb04ce3 to your computer and use it in GitHub Desktop.
Save Rahiche/326b1da4e53a67589316afd75fb04ce3 to your computer and use it in GitHub Desktop.
Scaffold(
appBar: AppBar(),
bottomNavigationBar: BottomAppBar(
child: Container(
height: 50.0,
child: Row(
children: <Widget>[
Expanded(
child: IconButton(
icon: Icon(Icons.person),
onPressed: () => controller.index = 0),
),
Expanded(
child: IconButton(
icon: Icon(Icons.notifications),
onPressed: () => controller.index = 1),
),
],
),
),
),
body: TabBarView(
controller: controller,
children: [
Center(
child: Text("Page 1"),
),
Center(
child: Text("Page 2"),
),
]),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment