Robo-advisory-dart/lib/screens/dashboard/local_widgets/bottom_navigation.dart

55 lines
1.6 KiB
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'package:robo_advisory/theme/icons.dart';
import 'package:flutter_svg/flutter_svg.dart';
class BottomNavigation extends StatelessWidget {
BottomNavigation({@required this.selectedIndex, @required this.onItemTapped});
final int selectedIndex;
final Function onItemTapped;
@override
Widget build(BuildContext context) {
return BottomNavigationBar(
type: BottomNavigationBarType.fixed,
backgroundColor: Color(0xFFC4C4C4),
items: <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: SvgPicture.asset(
homeIcon,
color: selectedIndex == 0 ? Color(0xFF896126) : Colors.black,
height: 30.0,
),
label: '',
),
BottomNavigationBarItem(
icon: SvgPicture.asset(
shareIcon,
color: selectedIndex == 1 ? Color(0xFF896126) : Colors.black,
height: 30.0,
),
label: '',
),
BottomNavigationBarItem(
icon: SvgPicture.asset(
reloadIcon,
color: selectedIndex == 2 ? Color(0xFF896126) : Colors.black,
height: 30.0,
),
label: '',
),
BottomNavigationBarItem(
icon: SvgPicture.asset(
currencyIcon,
color: selectedIndex == 3 ? Color(0xFF896126) : Colors.black,
height: 30.0,
),
label: '',
),
],
showSelectedLabels: false,
showUnselectedLabels: false,
currentIndex: selectedIndex,
onTap: onItemTapped,
);
}
}