-
Notifications
You must be signed in to change notification settings - Fork 147
/
navigationBar.dart
69 lines (68 loc) · 2.27 KB
/
navigationBar.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
59
60
61
62
63
64
65
66
67
68
69
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:songtube/internal/languages.dart';
class AppBottomNavigationBar extends StatelessWidget {
final int currentIndex;
final Function(int) onItemTap;
AppBottomNavigationBar({
@required this.currentIndex,
@required this.onItemTap
});
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.black12.withOpacity(0.05),
spreadRadius: 0.1,
blurRadius: 10
),
],
),
child: BottomNavigationBar(
backgroundColor: Theme.of(context).cardColor,
currentIndex: currentIndex,
selectedLabelStyle: TextStyle(
fontFamily: 'Varela',
fontWeight: FontWeight.w600
),
unselectedLabelStyle: TextStyle(
fontFamily: 'Varela',
fontWeight: FontWeight.w600
),
iconSize: 22,
selectedFontSize: 12,
unselectedFontSize: 10,
elevation: 8,
selectedItemColor: Theme.of(context).accentColor,
unselectedItemColor: Theme.of(context).iconTheme.color,
type: BottomNavigationBarType.fixed,
onTap: (int index) => onItemTap(index),
items: [
BottomNavigationBarItem(
icon: Icon(EvaIcons.homeOutline),
label: Languages.of(context).labelHome
),
BottomNavigationBarItem(
icon: Icon(EvaIcons.cloudDownloadOutline),
label: Languages.of(context).labelDownloads
),
BottomNavigationBarItem(
icon: Icon(EvaIcons.musicOutline),
label: Languages.of(context).labelMedia
),
BottomNavigationBarItem(
icon: Icon(EvaIcons.videoOutline),
label: "YouTube"
),
BottomNavigationBarItem(
icon: Icon(MdiIcons.dotsHorizontal),
label: Languages.of(context).labelMore
)
]
),
);
}
}