You are on page 1of 2

import 'package:flutter/material.

dart';
void main()=> runApp(MaterialApp(
debugShowCheckedModeBanner: false,
title: "My App",
home: TabesExample(),
));
class TabesExample extends StatefulWidget{
@override
State<StatefulWidget> createState() {
return TabsState();
}

}
class TabsState extends State<TabesExample>{
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 6,
child: Scaffold(
appBar: AppBar(
title: Text("Tabes example"),
bottom: TabBar(tabs:[
Tab(icon:
Icon(Icons.school),),
Tab(icon:
Icon(Icons.home),),
Tab(icon:
Icon(Icons.local_hospital),),
Tab(icon:
Icon(Icons.school),),
Tab(icon:
Icon(Icons.home),),
Tab(icon:
Icon(Icons.local_hospital),),
] ),
),
body: TabBarView(
children:[
Container(
color: Colors.redAccent,
child: Center(
child: Text("hi from sechool",style: TextStyle(color: Colors.white),),

),
),
Container(
color: Colors.greenAccent,
child: Center(
child: Text("hi from home",style: TextStyle(color: Colors.white),),

),
),
Container(
color: Colors.blueAccent,
child: Center(
child: Text("hi from hosipital",style: TextStyle(color: Colors.white),),

),
),
Container(
color: Colors.redAccent,
child: Center(
child: Text("hi from sechool",style: TextStyle(color: Colors.white),),

),
),
Container(
color: Colors.greenAccent,
child: Center(
child: FractionallySizedBox(
widthFactor: 0.6,
child: RaisedButton(
color: Color(0xFF00A0BF),
textColor: Color(0xFFFFFFFF),
child: Text('LOGIN',style: TextStyle(letterSpacing: 4.0),),
shape: RoundedRectangleBorder(side: BorderSide.none),
onPressed: ()=> null,),
),

),
),
Container(
color: Colors.blueAccent,
child: Center(
child: Text("hi from hosipital",style: TextStyle(color: Colors.white),),

),
),
] ),
)
);
}

You might also like