Last active
July 7, 2018 05:36
-
-
Save diegoveloper/7c93fceec562a25711b7e1b9c14d9318 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class MainPersistentTabBar extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return DefaultTabController( | |
length: 2, | |
child: Scaffold( | |
appBar: AppBar( | |
bottom: TabBar( | |
tabs: [ | |
Tab(icon: Icon(Icons.directions_car), text: "Tab 1",), | |
Tab(icon: Icon(Icons.directions_transit), text: "Tab 2"), | |
], | |
), | |
title: Text('Persistent Tab Demo'), | |
), | |
body: TabBarView( | |
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