forked from DHEERAJHARODE/Hacktoberfest2025-Open-source-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotched bottom navigation bar.dart
More file actions
73 lines (67 loc) · 1.97 KB
/
notched bottom navigation bar.dart
File metadata and controls
73 lines (67 loc) · 1.97 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
class CorePage extends StatefulWidget {
const CorePage({Key? key}) : super(key: key);
@override
_CorePageState createState() => _CorePageState();
}
class _CorePageState extends State<CorePage> {
int _currentindex = 0;
final screenList = [
HomePage(),
ProfilePage(),
NotificationPage(),
];
@override
Widget build(BuildContext context) {
return Scaffold(
floatingActionButton:
FloatingActionButton(
tooltip: "Add Art",
onPressed: () {},
child: Icon(
Icons.add,
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation.miniCenterDocked,
body: screenList[_currentindex],
bottomNavigationBar: BottomAppBar(
color: Colors.pink,
clipBehavior: Clip.antiAliasWithSaveLayer,
notchMargin: 6,
shape: const CircularNotchedRectangle(),
child: BottomNavigationBar(
// backgroundColor: Colors.grey[50],
showSelectedLabels: true,
iconSize: 20,
selectedItemColor: Colors.black,
showUnselectedLabels: true,
elevation: 20,
currentIndex: _currentindex,
type: BottomNavigationBarType.fixed,
items: const [
BottomNavigationBarItem(
activeIcon: Icon(Icons.home_rounded),
icon: Icon(Icons.home_outlined),
label: "Home",
),
BottomNavigationBarItem(
activeIcon: Icon(null),
icon: Icon(null),
label: "Publish",
),
BottomNavigationBarItem(
activeIcon: Icon(Icons.notifications_rounded),
icon: Icon(Icons.notifications_outlined),
label: "Notifications",
),
],
onTap: (index) {
setState(() {
_currentindex = index;
});
},
),
),
);
}
}