You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.7 KiB
Dart
48 lines
1.7 KiB
Dart
import 'package:car_provider_app/classes/colors.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
Widget mBottomNavBar(int selectedIndex, Function(int) onSelected) {
|
|
return BottomNavigationBar(
|
|
items: <BottomNavigationBarItem>[
|
|
BottomNavigationBarItem(
|
|
icon: SvgPicture.asset("assets/icons/ic_branches.svg"),
|
|
activeIcon: SvgPicture.asset("assets/icons/ic_branches.svg", color: MyColors.primaryColor),
|
|
label: 'Branches',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: SvgPicture.asset("assets/icons/ic_appoinments.svg"),
|
|
activeIcon: SvgPicture.asset("assets/icons/ic_appoinments.svg", color: MyColors.primaryColor),
|
|
label: 'Appointments',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: SvgPicture.asset("assets/icons/ic_home.svg"),
|
|
activeIcon: SvgPicture.asset("assets/icons/ic_home.svg", color: MyColors.primaryColor),
|
|
label: 'Home',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: SvgPicture.asset("assets/icons/ic_ads.svg"),
|
|
activeIcon: SvgPicture.asset("assets/icons/ic_ads.svg", color: MyColors.primaryColor),
|
|
label: 'Ads',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: SvgPicture.asset("assets/icons/ic_requests.svg"),
|
|
activeIcon: SvgPicture.asset("assets/icons/ic_requests.svg", color: MyColors.primaryColor),
|
|
label: 'Requests',
|
|
),
|
|
],
|
|
currentIndex: selectedIndex,
|
|
type: BottomNavigationBarType.fixed,
|
|
selectedItemColor: Colors.amber[800],
|
|
showSelectedLabels: true,
|
|
showUnselectedLabels: true,
|
|
unselectedItemColor: MyColors.lightTextColor,
|
|
unselectedFontSize: 10,
|
|
selectedFontSize: 10,
|
|
onTap: (i) {
|
|
onSelected(i);
|
|
},
|
|
);
|
|
}
|