-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbottommnavigationbar.dart
33 lines (31 loc) · 1.12 KB
/
bottommnavigationbar.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
import 'package:flutter/material.dart';
class BottomBar extends StatelessWidget {
final GlobalKey<ScaffoldState>_key=GlobalKey();
@override
Widget build(BuildContext context) {
return Scaffold(
bottomNavigationBar: BottomNavigationBar(
//currentIndex: 0,
showSelectedLabels: true,
showUnselectedLabels: true,
selectedItemColor: Colors.black.withOpacity(1),
unselectedItemColor: Colors.black87,
items: [
BottomNavigationBarItem(icon: GestureDetector(
onTap: () {
print('object');
},
child: Icon(Icons.home, size: 32,)), label: ''),
BottomNavigationBarItem(
icon: Icon(Icons.search, size: 32,), label: ''),
BottomNavigationBarItem(
icon: Image.asset('assets/add.png', width: 28), label: ''),
BottomNavigationBarItem(
icon: Icon(Icons.favorite_border, size: 32,), label: ''),
BottomNavigationBarItem(
icon: Image.asset('assets/flutter.png', width: 32,), label: ''),
],
),
);
}
}