done dashboard page

merge-requests/34/head
Mohammad Aljammal 5 years ago
parent 895c09efa4
commit 01a011a03d

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

@ -326,7 +326,7 @@ const Map<String, Map<String, String>> localizedValues = {
"OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدلايات الحبيب'},
"EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'},
"OnlinePaymentService": {"en": "Online Payment Service", 'ar': 'خدمة الدفع عبر الإلكتدوني'},
"OffersAndPackages": {"en": "Offers and Packages", 'ar': 'العروض والباقات'},
"OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'},
"ComprehensiveMedicalCheckup": {"en": "Comprehensive Medical Check up", 'ar': 'فحص طبي شامل'},
"HMGService": {"en": "HMG Service", 'ar': 'جميع خدمات الحبيب'},
"ViewAllHabibMedicalService": {"en": "View All Habib Medical Service", 'ar': 'عرض خدمات الحبيب الطبية'},
@ -346,5 +346,6 @@ const Map<String, Map<String, String>> localizedValues = {
"gate":{"en":"Gate:","ar":"بوابة"},
"building":{"en":"Building:","ar":"المبنى"},
"branch":{"en":"Branch:","ar":"الفرع"},
"emergencyServices":{"en":"Emergency Services:","ar":"خدمات الطوارئ"},
};

@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
class BaseViewModel extends ChangeNotifier {
ViewState _state = ViewState.Idle;
bool isInternetConnection = true;
bool isLogin = false;
ViewState get state => _state;
@ -27,6 +28,10 @@ class BaseViewModel extends ChangeNotifier {
_getUser() async {
var userData = await sharedPref.getObject(USER_PROFILE);
if (userData != null) user = AuthenticatedUser.fromJson(userData);
var isLogin = await sharedPref.getString(LOGIN_TOKEN_ID);
this.isLogin = isLogin != null;
notifyListeners();
}
}

@ -1,8 +1,29 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/service/dashboard_service.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../locator.dart';
class DashboardViewModel extends BaseViewModel {
VitalSignService _vitalSignService = locator<VitalSignService>();
String weightKg = "";
String heightCm = "";
String bloadType = "";
getPatientRadOrders() async {
if (!isLogin) {
setState(ViewState.Busy);
await _vitalSignService.getPatientRadOrders();
if (_vitalSignService.hasError) {
error = _vitalSignService.error;
setState(ViewState.Error);
} else
_vitalSignService.vitalSignResModelList.forEach((element) {
weightKg = '${element.weightKg}';
heightCm = '${element.heightCm}';
});
setState(ViewState.Idle);
}
}
}

@ -2,10 +2,11 @@ import 'dart:async';
import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart';
class ProjectViewModel with ChangeNotifier {
class ProjectViewModel extends BaseViewModel {
AppSharedPreferences sharedPref = AppSharedPreferences();
Locale _appLocale;
String currentLanguage = 'ar';

@ -1,3 +1,5 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class AuthenticatedUser {
String setupID;
int patientType;
@ -11,6 +13,7 @@ class AuthenticatedUser {
int relationshipID;
int gender;
String dateofBirth;
DateTime dateofBirthDataTime;
dynamic dateofBirthN;
String nationalityID;
dynamic phoneResi;
@ -135,6 +138,7 @@ class AuthenticatedUser {
relationshipID = json['RelationshipID'];
gender = json['Gender'];
dateofBirth = json['DateofBirth'];
dateofBirthDataTime = DateUtil.convertStringToDate(json['DateofBirth']);
dateofBirthN = json['DateofBirthN'];
nationalityID = json['NationalityID'];
phoneResi = json['PhoneResi'];

@ -1,6 +1,9 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -12,6 +15,10 @@ import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class HomePage extends StatefulWidget {
final Function goToMyProfile;
HomePage({Key key, this.goToMyProfile});
@override
_HomePageState createState() => _HomePageState();
}
@ -20,300 +27,497 @@ class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
body: Container(
width: double.infinity,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Stack(
children: <Widget>[
Column(
children: <Widget>[
Container(
width: double.infinity,
height: 210,
decoration: BoxDecoration(
image: DecorationImage(
image: ExactAssetImage(
'assets/images/timeline_bg.png'),
fit: BoxFit.cover),
return BaseView<DashboardViewModel>(
onModelReady: (model) => model.getPatientRadOrders(),
builder: (_, model, wi) => AppScaffold(
body: Container(
width: double.infinity,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Stack(
children: <Widget>[
Column(
children: <Widget>[
Container(
width: double.infinity,
height: 210,
decoration: BoxDecoration(
image: DecorationImage(
image: ExactAssetImage(
'assets/images/dashboard_top_bg.png'),
fit: BoxFit.cover),
),
child: Stack(
children: <Widget>[
Positioned(
top: 30,
left: 15,
right: 15,
child: Container(
width:
MediaQuery.of(context).size.width * 0.8,
child: Row(
children: <Widget>[
Expanded(
child: InkWell(
onTap: () => Navigator.push(context,
FadePage(page: LiveCareHome())),
child: Container(
height: 110,
padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
color: Colors.white
.withOpacity(0.3),
borderRadius: BorderRadius.all(
Radius.circular(5))),
child: Image.asset(
'assets/images/livecare_white_logo.png',
),
),
),
),
Expanded(
child: Container(
height: 110,
padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
color:
Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(
Radius.circular(5))),
// child: Image.asset('assets/images/livecare_white_logo.png',),
),
),
],
),
),
)
],
),
),
child: Stack(
children: <Widget>[
Positioned(
top: 30,
left: 15,
right: 15,
Container(width: double.infinity, height: 80)
],
),
Positioned(
top: 155,
left: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation ==
Orientation.landscape
? 0.02
: 0.03),
right: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation ==
Orientation.landscape
? 0.02
: 0.03),
child: (!model.isLogin && projectViewModel.user == null)
? Container(
width: double.infinity,
height: 125,
decoration: BoxDecoration(
color: Hexcolor('#A59E9E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent, width: 0.5),
borderRadius:
BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
image: ExactAssetImage(
'assets/images/bg_graphic.png'),
fit: BoxFit.cover)),
child: Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Row(
margin: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).myMedicalFile,
color: Colors.black87,
bold: true,
fontSize: 23,
),
SizedBox(
height: 5,
),
Texts(
TranslationBase.of(context)
.myMedicalFileSubTitle,
color: Colors.black,
fontSize: 16,
),
Align(
alignment: projectViewModel.isArabic
? Alignment.bottomLeft
: Alignment.bottomRight,
child: InkWell(
onTap: () => Navigator.push(context,
FadePage(page: LiveCareHome())),
onTap: () {
widget.goToMyProfile();
},
child: Container(
height: 110,
margin: EdgeInsets.all(5),
margin: EdgeInsets.all(2),
width: 90,
height: 30,
decoration: BoxDecoration(
color: Colors.transparent
.withOpacity(0.3),
color: Hexcolor('#D81A2E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent,
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(9)),
),
child: Center(
child: Texts(
'Live care ',
TranslationBase.of(context)
.viewMore,
color: Colors.white,
fontSize: 12,
),
),
),
),
),
Expanded(
child: Container(
height: 110,
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
color: Colors.transparent
.withOpacity(0.3),
)),
),
)
],
),
),
)
],
),
),
Container(width: double.infinity, height: 80)
],
),
Positioned(
top: 155,
left: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation ==
Orientation.landscape
? 0.02
: 0.03),
right: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation ==
Orientation.landscape
? 0.02
: 0.03),
child: Container(
width: double.infinity,
height: 125,
decoration: BoxDecoration(
color: Hexcolor('#A59E9E'),
shape: BoxShape.rectangle,
border:
Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
image: ExactAssetImage(
'assets/images/bg_graphic.png'),
fit: BoxFit.cover)),
child: Container(
margin: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).myMedicalFile,
color: Colors.black87,
bold: true,
fontSize: 23,
),
SizedBox(
height: 5,
),
Texts(
TranslationBase.of(context).myMedicalFileSubTitle,
color: Colors.black,
fontSize: 16,
),
Align(
alignment: projectViewModel.isArabic
? Alignment.bottomLeft
: Alignment.bottomRight,
child: InkWell(
onTap: () {},
child: Container(
margin: EdgeInsets.all(2),
width: 90,
height: 30,
decoration: BoxDecoration(
color: Hexcolor('#D81A2E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent, width: 0.5),
borderRadius:
BorderRadius.all(Radius.circular(9)),
),
child: Center(
child: Texts(
TranslationBase.of(context).viewMore,
color: Colors.white,
fontSize: 12,
: Container(
width: double.infinity,
height: 130,
decoration: BoxDecoration(
color: Hexcolor('#A59E9E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent, width: 0.5),
borderRadius:
BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
image: ExactAssetImage(
'assets/images/bg_graphic.png'),
fit: BoxFit.cover),
),
child: Container(
margin: EdgeInsets.all(5),
child: Column(
children: <Widget>[
Row(
children: <Widget>[
if (model.user != null)
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 8,
),
Texts(
model.user.firstName +
" " +
model.user.lastName,
color: Colors.grey[100],
bold: true,
fontSize: 15,
),
Texts(
'${model.user.patientID}',
color: Colors.white,
fontSize: 14,
),
SizedBox(
height: 5,
),
Texts(
'${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}',
color: Colors.grey[100],
fontWeight: FontWeight.normal,
fontSize: 14,
),
],
),
),
InkWell(
onTap: () {
widget.goToMyProfile();
},
child: Container(
margin: EdgeInsets.all(2),
width: 90,
height: 30,
decoration: BoxDecoration(
color: Hexcolor('#D81A2E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent,
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(5),
),
),
child: Center(
child: Texts(
TranslationBase.of(context)
.viewMore,
color: Colors.white,
fontSize: 12,
),
),
),
)
],
),
),
Row(
//crossAxisAlignment: CrossAxisAlignment.center,
//mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Image.asset(
'assets/images/height_icon.png',
width: 35,
height: 40,
),
Texts(
"${model.heightCm}",
color: Colors.white,
)
],
),
),
SizedBox(
width: 3,
),
Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Image.asset(
'assets/images/weight_icon.png',
width: 25,
height: 40,
),
Texts(
'${model.weightKg}',
color: Colors.white,
)
],
),
),
SizedBox(
width: 3,
),
Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Image.asset(
'assets/images/blood_icon.png',
width: 35,
height: 40,
),
Texts(
'${model.bloadType}',
color: Colors.white,
)
],
),
),
],
)
],
),
),
)
],
),
),
),
),
),
],
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context)
.homeHealthCareService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: 14,
)
],
],
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context)
.homeHealthCareService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: 14,
)
],
),
),
),
height: 150,
imageName: 'home_healthcare_service_bg.png',
opacity: 0.5,
),
height: 150,
imageName: 'home_healthcare_service_bg.png',
opacity: 0.5,
),
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/new-design/pharmacy_icon.png',
width: 40,
height: 40,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).onlinePharmacy,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
)
],
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/pharmacy_logo.png',
width: 40,
height: 40,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).onlinePharmacy,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
)
],
),
),
),
height: 150,
imageName: 'al-habib_onlne_pharmacy_bg.png',
),
height: 150,
imageName: 'al-habib_onlne_pharmacy_bg.png',
),
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).emergencyService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: 14,
)
],
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/comprehensive_medical_checkup_logo.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).emergencyService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: 14,
)
],
),
),
),
height: 150,
color: Hexcolor("#747C80"),
imageName: 'emergency_service_image.png',
),
height: 150,
color: Hexcolor("#747C80"),
imageName: 'emergency_service_image.png',
),
],
],
),
),
),
SizedBox(
height: 8,
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/new-design/online_payment_icon.png',
width: 80,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context)
.onlinePaymentService,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2,
)
],
SizedBox(
height: 8,
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/al-habib_online_payment_service_icon.png',
height: 55,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context)
.onlinePaymentService,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2,
)
],
),
),
),
height: 150,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
height: 150,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
Container(
Container(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/ereferral_service_icon.png',
width: 50,
height: 55,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context)
.offersAndPackages,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2,
)
],
),
),
),
width: MediaQuery.of(context).size.width * 0.29,
height: 150,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
)),
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/offer_icon.png',
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
@ -321,146 +525,114 @@ class _HomePageState extends State<HomePage> {
height: 15,
),
Texts(
TranslationBase.of(context).offersAndPackages,
TranslationBase.of(context).emergencyServices,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2,
fontSize: SizeConfig.textMultiplier * 1.60,
)
],
),
),
),
width: MediaQuery.of(context).size.width * 0.29,
height: 150,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
)),
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
),
),
],
),
),
SizedBox(
height: 8,
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
DashboardItem(
child: Container(
width: double.infinity,
padding: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
Texts(
TranslationBase.of(context).hMGService,
color: Colors.white,
fontWeight: FontWeight.normal,
),
Texts(
TranslationBase.of(context)
.comprehensiveMedicalCheckup,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 1.60,
.viewAllHabibMedicalService,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
),
Expanded(
child: Container(),
),
Texts(
TranslationBase.of(context).viewMore,
color: Colors.white,
//fontWeight: FontWeight.normal,
)
],
),
),
height: 100,
imageName: 'hmg_services_bg .png',
opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push(
context, FadePage(page: AllHabibMedicalService())),
),
height: 150,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
],
),
),
SizedBox(
height: 8,
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
DashboardItem(
child: Container(
width: double.infinity,
padding: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
TranslationBase.of(context).hMGService,
color: Colors.white,
fontWeight: FontWeight.normal,
),
Texts(
TranslationBase.of(context)
.viewAllHabibMedicalService,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
),
Expanded(
child: Container(),
),
Texts(
TranslationBase.of(context).viewMore,
color: Colors.white,
//fontWeight: FontWeight.normal,
)
],
),
),
height: 100,
imageName: 'hmg_services_bg .png',
opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push(
context, FadePage(page: AllHabibMedicalService())),
),
DashboardItem(
child: Container(
width: double.infinity,
padding: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
TranslationBase.of(context).contactUs,
color: Colors.white,
fontWeight: FontWeight.normal,
),
Texts(
TranslationBase.of(context).viewAllWaysReachUs,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
),
Expanded(
child: Container(),
),
Texts(
TranslationBase.of(context).viewMore,
color: Colors.white,
fontWeight: FontWeight.normal,
)
],
DashboardItem(
child: Container(
width: double.infinity,
padding: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
TranslationBase.of(context).contactUs,
color: Colors.white,
fontWeight: FontWeight.normal,
),
Texts(
TranslationBase.of(context).viewAllWaysReachUs,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
),
Expanded(
child: Container(),
),
Texts(
TranslationBase.of(context).viewMore,
color: Colors.white,
fontWeight: FontWeight.normal,
)
],
),
),
height: 100,
imageName: 'contact_us_bg.png',
opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
),
height: 100,
imageName: 'contact_us_bg.png',
opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
),
],
],
),
),
),
SizedBox(
height: 80,
)
],
SizedBox(
height: 80,
)
],
),
),
),
),

@ -229,14 +229,16 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
physics: NeverScrollableScrollPhysics(),
controller: pageController,
children: [
HomePage(),
HomePage(goToMyProfile: (){
_changeCurrentTab(1);
},),
MedicalProfilePage(),
MyAdmissionsPage(),
ToDo(),
BookingOptions()
], // Please do not remove the BookingOptions from this array
),
bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab),
bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab,index: currentTab,),
);
}

@ -142,7 +142,7 @@ class AuthProvider with ChangeNotifier {
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
//throw error;
}
}

@ -430,6 +430,7 @@ class TranslationBase {
String get gate =>localizedValues['gate'][locale.languageCode];
String get building =>localizedValues['building'][locale.languageCode];
String get branch =>localizedValues['branch'][locale.languageCode];
String get emergencyServices =>localizedValues['emergencyServices'][locale.languageCode];

@ -9,8 +9,8 @@ import 'bottom_navigation_item.dart';
class BottomNavBar extends StatefulWidget {
final ValueChanged<int> changeIndex;
BottomNavBar({Key key, this.changeIndex}) : super(key: key);
final int index ;
BottomNavBar({Key key, this.changeIndex,this.index}) : super(key: key);
@override
_BottomNavBarState createState() => _BottomNavBarState();
@ -21,15 +21,6 @@ class _BottomNavBarState extends State<BottomNavBar> {
_changeIndex(int index) {
widget.changeIndex(index);
setState(() {
_index = index;
// Navigate to Appointment Booking Flow
// if (_index == 4) navigateToBookingOptions(context);
// Navigate to upcoming list
//if (_index == 3) navigateToToDoList(context);
});
}
@override
@ -48,7 +39,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
icon: EvaIcons.home,
activeIcon: EvaIcons.home,
changeIndex: _changeIndex,
index: _index,
index: widget.index,
currentIndex: 0,
name: TranslationBase.of(context).home,
),
@ -56,7 +47,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
icon: EvaIcons.list,
activeIcon: EvaIcons.list,
changeIndex: _changeIndex,
index: _index,
index: widget.index,
currentIndex: 1,
name: TranslationBase.of(context).medicalProfile,
),
@ -87,7 +78,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
icon: EvaIcons.person,
activeIcon: EvaIcons.person,
changeIndex: _changeIndex,
index: _index,
index: widget.index,
currentIndex: 2,
name: TranslationBase.of(context).mySchedule,
),
@ -95,7 +86,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
icon: EvaIcons.calendar,
activeIcon: EvaIcons.calendar,
changeIndex: _changeIndex,
index: _index,
index: widget.index,
currentIndex: 3,
name: TranslationBase.of(context).todoList,
)

Loading…
Cancel
Save