fix bottom nav bar

merge-requests/255/head
Mohammad Aljammal 5 years ago
parent 9d8c1ddf63
commit 3e441c55b2

@ -1646,4 +1646,8 @@ const Map localizedValues = {
"en": "Enter Diastolic Value", "en": "Enter Diastolic Value",
"ar": "أدخل قيمة الإنبساط " "ar": "أدخل قيمة الإنبساط "
}, },
"cmc-heading": {
"en": "Comprehensive Medical Checkup",
"ar": "فحص طبي شامل"
},
}; };

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart';
@ -421,7 +422,7 @@ class _HomePageState extends State<HomePage> {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: HomeHealthCareIndexPage(), page: HomeHealthCarePage(),
), ),
); );
}, },
@ -436,10 +437,10 @@ class _HomePageState extends State<HomePage> {
height: 50, height: 50,
), ),
SizedBox( SizedBox(
height: 3, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context).homeHealthCareService, TranslationBase.of(context).cmcHeading,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -505,7 +506,7 @@ class _HomePageState extends State<HomePage> {
height: 50, height: 50,
), ),
SizedBox( SizedBox(
height: 3, height:10,
), ),
Texts( Texts(
TranslationBase.of(context).emergencyService, TranslationBase.of(context).emergencyService,

@ -607,6 +607,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
return TranslationBase.of(context).medicalProfile; return TranslationBase.of(context).medicalProfile;
case 2: case 2:
return TranslationBase.of(context).bookAppo; return TranslationBase.of(context).bookAppo;
case 5:
return TranslationBase.of(context).bookAppo;
case 3: case 3:
return TranslationBase.of(context).services; return TranslationBase.of(context).services;
case 4: case 4:

@ -54,15 +54,19 @@ class MedicalProfilePage extends StatefulWidget {
class _MedicalProfilePageState extends State<MedicalProfilePage> { class _MedicalProfilePageState extends State<MedicalProfilePage> {
var authProvider = new AuthProvider(); var authProvider = new AuthProvider();
List<Medical> medical=List(); List<Medical> medical = List();
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
var appoCountProvider = Provider.of<ToDoCountProviderModel>(context); var appoCountProvider = Provider.of<ToDoCountProviderModel>(context);
List<Widget> myMedicalList = Utils.myMedicalList(
List<Widget> myMedicalList = Utils.myMedicalList(projectViewModel: projectViewModel,context: context,count: appoCountProvider.count,isLogin: projectViewModel.isLogin); projectViewModel: projectViewModel,
return BaseView<MedicalViewModel>( context: context,
count: appoCountProvider.count,
isLogin: projectViewModel.isLogin);
return BaseView<MedicalViewModel>(
onModelReady: (model) => model.getAppointmentHistory(), onModelReady: (model) => model.getAppointmentHistory(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowDecPage: false, isShowDecPage: false,
@ -97,25 +101,30 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
itemCount: model itemCount: model
.appoitmentAllHistoryResultList.length, .appoitmentAllHistoryResultList.length,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
reverse: !projectViewModel.isArabic, reverse: projectViewModel.isArabic,
), ),
], ],
), ),
), ),
SizedBox(height: 50,), SizedBox(
height: 50,
),
Padding( Padding(
padding: EdgeInsets.symmetric(vertical: 5.0), padding: EdgeInsets.symmetric(vertical: 5.0),
child: GridView.builder( child: GridView.builder(
shrinkWrap: true, shrinkWrap: true,
primary: false, primary: false,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, crossAxisCount: 3,
childAspectRatio: MediaQuery.of(context).size.width / (MediaQuery.of(context).size.height / 2.40), childAspectRatio: MediaQuery.of(context)
.size
.width /
(MediaQuery.of(context).size.height / 2.40),
), ),
itemCount: myMedicalList.length, itemCount: myMedicalList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return myMedicalList[index]; return myMedicalList[index];
}, },
), ),
@ -123,8 +132,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
], ],
), ),
SizedBox( SizedBox(
height: height: MediaQuery.of(context).size.height * 0.12,
MediaQuery.of(context).size.height * 0.12,
), ),
if (model.user != null && model.isLogin) if (model.user != null && model.isLogin)
Positioned( Positioned(
@ -135,7 +143,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
width: double.infinity, width: double.infinity,
height: 80, height: 80,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Colors.grey[500],
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, width: 0.5), color: Colors.transparent, width: 0.5),
@ -187,20 +195,13 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
), ),
); );
} }
fullMedicalData(){
if(projectViewModel.havePrivilege(5))
{}
}
} }
class Medical{ class Medical {
final String title;
final String title; final String imagePath;
final String imagePath; final String subTitle;
final String subTitle; final Widget page;
final Widget page;
Medical({this.title, this.imagePath, this.subTitle, this.page});
Medical({this.title, this.imagePath, this.subTitle, this.page});
} }

@ -1377,15 +1377,10 @@ class TranslationBase {
localizedValues["viewTermsConditions"][locale.languageCode]; localizedValues["viewTermsConditions"][locale.languageCode];
String get walkinAppo => localizedValues["WalkinAppo"][locale.languageCode]; String get walkinAppo => localizedValues["WalkinAppo"][locale.languageCode];
String get videoAppo => localizedValues["videoAppo"][locale.languageCode]; String get videoAppo => localizedValues["videoAppo"][locale.languageCode];
String get addNewChild => localizedValues["add-new-child"][locale.languageCode];
String get sendChildEmailMsg => localizedValues["send-child-email-msg"][locale.languageCode];
String get vaccinationAddChildMsg => localizedValues["vaccination-add-child-msg"][locale.languageCode];
String get childAddedSuccessfully => localizedValues["child_added_successfully"][locale.languageCode];
String get bloodDEnterDesc => localizedValues["bloodD-enter-desc"][locale.languageCode];
String get viewTermsConditions => localizedValues["viewTermsConditions"][locale.languageCode];
String get weightAdd => localizedValues["weight-add"][locale.languageCode]; String get weightAdd => localizedValues["weight-add"][locale.languageCode];
String get systolicAdd => localizedValues["systolic-add"][locale.languageCode]; String get systolicAdd => localizedValues["systolic-add"][locale.languageCode];
String get diastolicAdd => localizedValues["systolic-add"][locale.languageCode]; String get diastolicAdd => localizedValues["systolic-add"][locale.languageCode];
String get cmcHeading => localizedValues["cmc-heading"][locale.languageCode];
} }

@ -95,7 +95,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
icon: EvaIcons.calendar, icon: EvaIcons.calendar,
activeIcon: EvaIcons.calendar, activeIcon: EvaIcons.calendar,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: widget.index,
currentIndex: 2, currentIndex: 2,
name: TranslationBase.of(context).bookAppo, name: TranslationBase.of(context).bookAppo,
), ),

@ -72,9 +72,8 @@ class TimeLineWidget extends StatelessWidget {
width: 15, width: 15,
height: 15, height: 15,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Colors.yellow[700],
border: Border.all( border: Border.all(color: Colors.yellow[700], width: 2),
color: Theme.of(context).primaryColor, width: 2),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(25.0), Radius.circular(25.0),
@ -111,7 +110,7 @@ class TimeLineWidget extends StatelessWidget {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Texts( Texts(
appoitmentAllHistoryResul.clinicName, appoitmentAllHistoryResul.clinicName.trim(),
color: Colors.white, color: Colors.white,
fontSize: 12.5, fontSize: 12.5,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
@ -132,9 +131,8 @@ class TimeLineWidget extends StatelessWidget {
width: 15, width: 15,
height: 15, height: 15,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Colors.yellow[700],
border: Border.all( border: Border.all(color: Colors.yellow[700], width: 2),
color: Theme.of(context).primaryColor, width: 2),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(25.0), Radius.circular(25.0),
@ -164,7 +162,7 @@ class TimeLineWidget extends StatelessWidget {
height: 3, height: 3,
), ),
Texts( Texts(
appoitmentAllHistoryResul.doctorNameObj, appoitmentAllHistoryResul.doctorNameObj.trim(),
color: Colors.white, color: Colors.white,
fontSize: 10.5, fontSize: 10.5,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,

Loading…
Cancel
Save