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.
70 lines
2.5 KiB
Dart
70 lines
2.5 KiB
Dart
import 'package:diplomaticquarterapp/d_q_icons_icons.dart';
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'bottom_nav_pharmacy_home_item.dart';
|
|
import 'bottom_nav_pharmacy_item.dart';
|
|
|
|
class BottomNavPharmacyBar extends StatefulWidget {
|
|
ValueChanged<int> changeIndex;
|
|
|
|
BottomNavPharmacyBar({Key? key, required this.changeIndex, required this.index}) : super(key: key);
|
|
int index = 0;
|
|
|
|
@override
|
|
_BottomNavPharmacyBarState createState() => _BottomNavPharmacyBarState();
|
|
}
|
|
|
|
class _BottomNavPharmacyBarState extends State<BottomNavPharmacyBar> {
|
|
_changeIndex(int index) {
|
|
widget.changeIndex!(index);
|
|
}
|
|
changeIndex() {
|
|
widget.changeIndex!(widget.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: Icons.image,
|
|
activeIcon: Icons.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: Icons.home, activeIcon: Icons.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)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|