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.
HMG_Patient_App/lib/widgets/pharmacy/bottom_nav_pharmacy_bar.dart

83 lines
2.7 KiB
Dart

import 'package:diplomaticquarterapp/d_q_icons_icons.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'bottom_nav_pharmacy_home_item.dart';
import 'bottom_nav_pharmacy_item.dart';
class BottomNavPharmacyBar extends StatefulWidget {
final ValueChanged<int> changeIndex;
int index = 0;
BottomNavPharmacyBar({Key key, this.changeIndex, this.index})
: super(key: key);
@override
_BottomNavPharmacyBarState createState() => _BottomNavPharmacyBarState();
}
class _BottomNavPharmacyBarState extends State<BottomNavPharmacyBar> {
_changeIndex(int index) {
widget.changeIndex(index);
}
@override
Widget build(BuildContext context) {
return BottomAppBar(
elevation: 4,
shape: CircularNotchedRectangle(),
color: Colors.white,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 18),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
BottomNavHomeItem(
icon: EvaIcons.image,
activeIcon: EvaIcons.image,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 0,
title: TranslationBase.of(context).Alhabibapp,
),
BottomNavPharmacyItem(
icon: DQIcons.categories_menu_icon,
activeIcon: DQIcons.categories_menu_icon,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 1,
title: TranslationBase.of(context).categorise,
),
BottomNavPharmacyItem(
icon: EvaIcons.home,
activeIcon: EvaIcons.home,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 0,
isHome: true,
title: TranslationBase.of(context).home),
BottomNavPharmacyItem(
icon: DQIcons.user_menu_icon,
activeIcon: DQIcons.user_menu_icon,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 2,
title: TranslationBase.of(context).myAccount,
),
BottomNavPharmacyItem(
icon: DQIcons.cart_menu_icon,
activeIcon: DQIcons.cart_menu_icon,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 3,
title: TranslationBase.of(context).cart)
],
),
),
);
}
}