|
|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
@ -9,6 +10,9 @@ import 'bottom_navigation_item.dart';
|
|
|
|
|
class BottomNavBar extends StatefulWidget {
|
|
|
|
|
final ValueChanged<int> changeIndex;
|
|
|
|
|
final int index;
|
|
|
|
|
|
|
|
|
|
DashboardViewModel dashboardViewModel = DashboardViewModel();
|
|
|
|
|
|
|
|
|
|
BottomNavBar({Key key, this.changeIndex, this.index}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@ -25,6 +29,12 @@ class _BottomNavBarState extends State<BottomNavBar> {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
widget.dashboardViewModel.getNotRepliedCount();
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return BottomAppBar(
|
|
|
|
|
@ -44,6 +54,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
|
|
|
|
|
index: widget.index,
|
|
|
|
|
currentIndex: 0,
|
|
|
|
|
name: TranslationBase.of(context).home,
|
|
|
|
|
dashboardViewModel: widget.dashboardViewModel,
|
|
|
|
|
),
|
|
|
|
|
BottomNavigationItem(
|
|
|
|
|
icon: DoctorApp.schedule_1,
|
|
|
|
|
@ -52,6 +63,8 @@ class _BottomNavBarState extends State<BottomNavBar> {
|
|
|
|
|
index: widget.index,
|
|
|
|
|
currentIndex: 1,
|
|
|
|
|
name: TranslationBase.of(context).mySchedule,
|
|
|
|
|
dashboardViewModel: widget.dashboardViewModel,
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
BottomNavigationItem(
|
|
|
|
|
icon: DoctorApp.qr_reader,
|
|
|
|
|
@ -60,6 +73,8 @@ class _BottomNavBarState extends State<BottomNavBar> {
|
|
|
|
|
index: widget.index,
|
|
|
|
|
currentIndex: 2,
|
|
|
|
|
name: TranslationBase.of(context).qr,
|
|
|
|
|
dashboardViewModel: widget.dashboardViewModel,
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
BottomNavigationItem(
|
|
|
|
|
icon: DoctorApp.dr_reply_1,
|
|
|
|
|
@ -68,6 +83,8 @@ class _BottomNavBarState extends State<BottomNavBar> {
|
|
|
|
|
index: widget.index,
|
|
|
|
|
currentIndex: 3,
|
|
|
|
|
name: TranslationBase.of(context).replay2,
|
|
|
|
|
dashboardViewModel: widget.dashboardViewModel,
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|