Skip to content

Instantly share code, notes, and snippets.

@paulallies
Created June 20, 2018 08:28
Show Gist options
  • Save paulallies/89cf2381d862a1e56707a07297aaa402 to your computer and use it in GitHub Desktop.
Save paulallies/89cf2381d862a1e56707a07297aaa402 to your computer and use it in GitHub Desktop.
Home Page for Flutter Nav
import 'package:flutter/material.dart';
//Drawer Widget
import '../pages/drawer.dart';
//Tabs Content
import '../pages/home/tab1.dart';
import '../pages/home/tab2.dart';
import '../pages/home/tab3.dart';
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new DefaultTabController(
length: 3,
child: Scaffold(
drawer: new MyDrawer(),
appBar: AppBar(
title: Text("Home"),
bottom: TabBar(
tabs: [
Tab(icon: Icon(Icons.directions_car)),
Tab(icon: Icon(Icons.directions_transit)),
Tab(icon: Icon(Icons.directions_bike)),
],
),
),
body: new TabBarView(
children: <Widget>[
new HomeTab1(),
new HomeTab2(),
new HomeTab3(),
],
)),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment