-
Notifications
You must be signed in to change notification settings - Fork 104
/
Copy pathtabbar.dart
58 lines (56 loc) · 1.41 KB
/
tabbar.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import 'package:flutter/material.dart';
import '/13_tabbar/tabs/first_tab.dart';
import '/13_tabbar/tabs/second_tab.dart';
import '/13_tabbar/tabs/third_tab.dart';
class MyTabBar extends StatelessWidget {
const MyTabBar({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
title: const Text("T A B B A R"),
),
body: Column(
children: const [
TabBar(
tabs: [
Tab(
icon: Icon(
Icons.home,
color: Colors.purple,
),
),
Tab(
icon: Icon(
Icons.settings,
color: Colors.purple,
),
),
Tab(
icon: Icon(
Icons.person,
color: Colors.purple,
),
)
],
),
Expanded(
child: TabBarView(
children: [
// 1st tab
FirstTab(),
// 2nd tab
SecondTab(),
// 3rd tab
ThirdTab(),
],
),
),
],
),
),
);
}
}