Created
July 7, 2018 05:39
-
-
Save diegoveloper/2f59762d0871252b53baf271803b8039 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'; | |
import 'package:flutter_samples/persistent_tabbar/page1.dart'; | |
import 'package:flutter_samples/persistent_tabbar/page2.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: "Non persistent",), | |
Tab(icon: Icon(Icons.directions_transit), text: "Persistent"), | |
], | |
), | |
title: Text('Persistent Tab Demo'), | |
), | |
body: TabBarView( | |
children: [ | |
Page1(), | |
Page2(), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment