Merge branch 'sultan' into 'master'

Sultan

See merge request Cloud_Solution/diplomatic-quarter!44
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit 62efc13047

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 97 KiB

@ -6,7 +6,7 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
const MAX_SMALL_SCREEN = 660; const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
const GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
@ -29,8 +29,10 @@ const GET_PRESCRIPTION_REPORT_ENH =
///Lab Order ///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; const GET_Patient_LAB_SPECIAL_RESULT =
const GET_Patient_LAB_RESULT = '/Services/Patients.svc/REST/GetPatientLabResults'; 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const GET_Patient_LAB_RESULT =
'/Services/Patients.svc/REST/GetPatientLabResults';
/// ///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
@ -43,8 +45,7 @@ const SEND_RAD_REPORT_EMAIL =
///Feedback ///Feedback
const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList';
const GET_STATUS_FOR_COCO = 'Services/COCWS.svc/REST/GetStatusforCOC'; const GET_STATUS_FOR_COCO = 'Services/COCWS.svc/REST/GetStatusforCOC';
const GET_PATIENT_AppointmentHistory = const GET_PATIENT_AppointmentHistory = 'Services'
'Services'
'/Doctors.svc/REST/PateintHasAppoimentHistory'; '/Doctors.svc/REST/PateintHasAppoimentHistory';
///VITAL SIGN ///VITAL SIGN
@ -52,59 +53,50 @@ const GET_PATIENT_VITAL_SIGN =
'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
///Er Nearest ///Er Nearest
const GET_NEAREST_HOSPITAL= const GET_NEAREST_HOSPITAL =
'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
///Er Nearest ///Er Nearest
const GET_AMBULANCE_REQUEST= 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
const GET_PATIENT_ALL_PRES_ORDERS= 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const GET_PATIENT_ALL_PRES_ORDERS= 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID= 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID= 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
///FindUs ///FindUs
const GET_FINDUS_REQUEST= const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
'Services/Lists.svc/REST/Get_HMG_Locations';
///LiveChat ///LiveChat
const GET_LIVECHAT_REQUEST= const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects';
'Services/Patients.svc/REST/GetPatientICProjects';
///babyInformation
const GET_BABYINFORMATION_REQUEST =
'Services/Community.svc/REST/GetBabyByUserID';
///Get Baby By User ID ///Get Baby By User ID
const GET_BABY_BY_USER_ID= 'Services/Community.svc/REST/GetBabyByUserID'; const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID';
///userInformation ///userInformation
const GET_USERINFORMATION_REQUEST= const GET_USERINFORMATION_REQUEST =
'Services/Community.svc/REST/GetUserInformation_New'; 'Services/Community.svc/REST/GetUserInformation_New';
///newUserId
const GET_NEW_USER_REQUEST=
'Services/Community.svc/REST/CreateNewUser_New';
///addNewChild ///addNewChild
const GET_NEWCHILD_REQUEST= const GET_NEWCHILD_REQUEST = 'Services/Community.svc/REST/CreateNewBaby';
'Services/Community.svc/REST/CreateNewBaby';
///delteChild ///newUserId
const DELETE_CHILD_REQUEST= const GET_NEW_USER_REQUEST = 'Services/Community.svc/REST/CreateNewUser_New';
'Services/Community.svc/REST/DeleteBaby';
///delteChild
const DELETE_CHILD_REQUEST = 'Services/Community.svc/REST/DeleteBaby';
///addNewTABLE ///addNewTABLE
const GET_TABLE_REQUEST= const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable';
'Services/Community.svc/REST/CreateVaccinationTable';
///BloodDenote ///BloodDenote
const GET_CITIES_REQUEST= const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities';
'Services/Lists.svc/REST/GetAllCities';
///BloodDetails ///BloodDetails
const GET_BLOOD_REQUEST= const GET_BLOOD_REQUEST =
'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
///Reports ///Reports
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
const INSERT_REQUEST_FOR_MEDICAL_REPORT = const INSERT_REQUEST_FOR_MEDICAL_REPORT =
@ -132,7 +124,8 @@ const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime";
//URL to dental doctors list //URL to dental doctors list
const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; const GET_DENTAL_DOCTORS_LIST_URL =
"Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
//URL to get doctor free slots //URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots";
@ -221,16 +214,16 @@ const CANCEL_LIVECARE_REQUEST =
const SEND_LIVECARE_INVOICE_EMAIL = const SEND_LIVECARE_INVOICE_EMAIL =
'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; 'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
const GET_USER_TERMS = '/Services/Patients.svc/REST/GetUserTermsAndConditions';
const GET_USER_TERMS ='/Services/Patients.svc/REST/GetUserTermsAndConditions'; const UPDATE_HEALTH_TERMS =
const UPDATE_HEALTH_TERMS ='/services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; '/services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
//URL to get medicine and pharmacies list //URL to get medicine and pharmacies list
const CHANNEL = 3; const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958'; const GENERAL_ID = 'Cs2020@2016\$2958';
const IP_ADDRESS = '10.20.10.20'; const IP_ADDRESS = '10.20.10.20';
const VERSION_ID = 5.6; const VERSION_ID = 5.6;
const SETUP_ID = '91877'; const SETUP_ID = '91877';
const LANGUAGE = 2; const LANGUAGE = 2;
const PATIENT_OUT_SA = 0; const PATIENT_OUT_SA = 0;
const SESSION_ID = 'TMRhVmkGhOsvamErw'; const SESSION_ID = 'TMRhVmkGhOsvamErw';
@ -258,11 +251,16 @@ const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail'; const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail';
const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; const GET_PATIENT_AdVANCE_BALANCE_AMOUNT =
const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; const GET_PATIENT_INFO_BY_ID =
const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; 'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER =
'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber';
const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
@ -273,47 +271,54 @@ const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFre
///My Trackers ///My Trackers
const GET_DIABETIC_RESULT_AVERAGE='Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; const GET_DIABETIC_RESULT_AVERAGE =
const GET_DIABTEC_RESULT='Services/Patients.svc/REST/Patient_GetDiabtecResults'; 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
const ADD_DIABTEC_RESULT='Services/Patients.svc/REST/Patient_AddDiabtecResult'; const GET_DIABTEC_RESULT =
'Services/Patients.svc/REST/Patient_GetDiabtecResults';
const ADD_DIABTEC_RESULT =
const GET_BLOOD_PRESSURE_RESULT_AVERAGE='Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; 'Services/Patients.svc/REST/Patient_AddDiabtecResult';
const GET_BLOOD_PRESSURE_RESULT='Services/Patients.svc/REST/Patient_GetBloodPressureResult';
const ADD_BLOOD_PRESSURE_RESULT='Services/Patients.svc/REST/Patient_AddBloodPressureResult'; const GET_BLOOD_PRESSURE_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
const GET_WEIGHT_PRESSURE_RESULT_AVERAGE='Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; const GET_BLOOD_PRESSURE_RESULT =
const GET_WEIGHT_PRESSURE_RESULT='Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; 'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
const ADD_WEIGHT_PRESSURE_RESULT='Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; const ADD_BLOOD_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID='Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; const GET_WEIGHT_PRESSURE_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
const GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; const GET_WEIGHT_PRESSURE_RESULT =
const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
const ADD_WEIGHT_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID =
'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
const GET_CALL_INFO_HOURS_RESULT =
'Services/Doctors.svc/REST/GetCallInfoHoursResult';
const GET_CALL_REQUEST_TYPE_LOV =
'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse';
const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus';
const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies'; const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies';
// H2O // H2O
const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; const H2O_GET_USER_PROGRESS =
const H2O_INSERT_USER_ACTIVITY="Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
const H2O_INSERT_USER_ACTIVITY =
"Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
//E_Referral Services //E_Referral Services
const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes"; const GET_ALL_RELATIONSHIP_TYPES =
const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; "Services/Patients.svc/REST/GetAllRelationshipTypes";
const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; const SEND_ACTIVATION_CODE_FOR_E_REFERRAL =
'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL =
'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities';
const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral";
const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals";

@ -379,6 +379,16 @@ const Map<String, Map<String, String>> localizedValues = {
"ar": "ar":
"السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك." "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك."
}, },
"user-view-requester": {
"en": "User Wants To View Your Medical File",
"ar": "أشخاص يرغبون الاطلاع على ملفك الطبي"
},
"user-view": {
"en": "User Can View Your Medical File",
"ar": "أشخاص يمكنهم الاطلاع على ملفك الطبي"
},
"parking": {"en": "Parking", "ar": "مواقف"}, "parking": {"en": "Parking", "ar": "مواقف"},
"alhabiServices": {"en": "HMG Service", "ar": "خدمات الحبيب"}, "alhabiServices": {"en": "HMG Service", "ar": "خدمات الحبيب"},
"parkingTitle": { "parkingTitle": {

@ -14,4 +14,5 @@ const FAMILY_FILE = 'family-file';
const USER_LAT = 'user-lat'; const USER_LAT = 'user-lat';
const USER_LONG = 'user-long'; const USER_LONG = 'user-long';
const IS_GO_TO_PARKING = 'IS_GO_TO_PARKING'; const IS_GO_TO_PARKING = 'IS_GO_TO_PARKING';
const IS_SEARCH_APPO = 'is-search-appo';
const IS_LIVECARE_APPOINTMENT = 'is_livecare_appointment'; const IS_LIVECARE_APPOINTMENT = 'is_livecare_appointment';

@ -32,7 +32,9 @@ class BaseAppClient {
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) { if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null ? body['SetupID'] : SETUP_ID ? body['SetupID'] != null
? body['SetupID']
: SETUP_ID
: SETUP_ID; : SETUP_ID;
} }
body['VersionID'] = VERSION_ID; body['VersionID'] = VERSION_ID;
@ -41,7 +43,9 @@ class BaseAppClient {
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID; body['generalid'] = GENERAL_ID;
body['PatientOutSA'] = body.containsKey('PatientOutSA') body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null ? body['PatientOutSA'] : PATIENT_OUT_SA ? body['PatientOutSA'] != null
? body['PatientOutSA']
: PATIENT_OUT_SA
: PATIENT_OUT_SA; : PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) { if (body.containsKey('isDentalAllowedBackend')) {
@ -55,30 +59,31 @@ class BaseAppClient {
body['DeviceTypeID'] = DeviceTypeID; body['DeviceTypeID'] = DeviceTypeID;
if(!body.containsKey('IsPublicRequest')) { if (!body.containsKey('IsPublicRequest')) {
body['PatientType'] = body.containsKey('PatientType') body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null ? body['PatientType'] : PATIENT_TYPE ? body['PatientType'] != null
? body['PatientType']
: PATIENT_TYPE
: PATIENT_TYPE; : PATIENT_TYPE;
body['PatientTypeID'] = body.containsKey('PatientTypeID') body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null ? body['PatientTypeID'] != null
? body['PatientTypeID'] ? body['PatientTypeID']
: PATIENT_TYPE_ID : PATIENT_TYPE_ID
: PATIENT_TYPE_ID; : PATIENT_TYPE_ID;
if (user != null) { if (user != null) {
body['TokenID'] = token; body['TokenID'] = token;
body['PatientID'] = body['PatientID'] =
body['PatientID'] != null ? body['PatientID'] : user['PatientID']; body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA']; body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = getSessionId(token); body['SessionID'] = SESSION_ID;//getSessionId(token);
} }
} }
print("URL : $url"); print("URL : $url");
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.post(url.trim(), final response = await http.post(url.trim(),
body: json.encode(body), body: json.encode(body),
@ -139,6 +144,7 @@ class BaseAppClient {
} }
String getSessionId(String id) { String getSessionId(String id) {
return id.replaceAll(RegExp('/[^a-zA-Z ]'), ''); ///return id.replaceAll(RegExp('/[^\w\s]/'), '');
// return id.replaceAll(RegExp('/[^a-zA-Z ]'), '');
} }
} }

@ -66,7 +66,8 @@ class MyApp extends StatelessWidget {
hintColor: Colors.grey[400], hintColor: Colors.grey[400],
disabledColor: Colors.grey[300], disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0), errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor:Hexcolor('#E9E9E9'),// Colors.grey[100], scaffoldBackgroundColor:
HexColor('#E9E9E9'), // Colors.grey[100],
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Colors.grey, textSelectionHandleColor: Colors.grey,
canvasColor: Colors.white, canvasColor: Colors.white,
@ -74,9 +75,8 @@ class MyApp extends StatelessWidget {
highlightColor: Colors.grey[100].withOpacity(0.4), highlightColor: Colors.grey[100].withOpacity(0.4),
splashColor: Colors.transparent, splashColor: Colors.transparent,
primaryColor: Colors.grey, primaryColor: Colors.grey,
bottomSheetTheme:BottomSheetThemeData( bottomSheetTheme: BottomSheetThemeData(
backgroundColor: Hexcolor('#E0E0E0') backgroundColor: HexColor('#E0E0E0')),
) ,
cursorColor: Colors.grey, cursorColor: Colors.grey,
iconTheme: IconThemeData(), iconTheme: IconThemeData(),
appBarTheme: AppBarTheme( appBarTheme: AppBarTheme(

@ -174,7 +174,9 @@ class PatientDoctorAppointmentList {
List<DoctorList> patientDoctorAppointmentList = List(); List<DoctorList> patientDoctorAppointmentList = List();
PatientDoctorAppointmentList( PatientDoctorAppointmentList(
{this.filterName, this.distanceInKMs, DoctorList patientDoctorAppointment}) { {this.filterName,
this.distanceInKMs,
DoctorList patientDoctorAppointment}) {
patientDoctorAppointmentList.add(patientDoctorAppointment); patientDoctorAppointmentList.add(patientDoctorAppointment);
} }
} }

@ -17,66 +17,63 @@ import 'e_referral_page.dart';
class EReferralIndexPage extends StatelessWidget { class EReferralIndexPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: "Service Information", appBarTitle: "Service Information",
body: SingleChildScrollView( body: SingleChildScrollView(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child:
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
"E-Referral: ",
fontWeight: FontWeight.normal,
fontSize: 25,
color: Hexcolor("#60686b"),
),
SizedBox(
height: 12,
),
Texts(
"This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of HMG Hospitals, By filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)",
fontWeight: FontWeight.normal,
fontSize: 17,
),
SizedBox(
height: 22,
),
Center(
child: SizedBox(
height: MediaQuery.of(context).size.height * 0.55,
width: MediaQuery.of(context).size.width * 0.50,
child: CarouselSlider(
imagesUrlList: [
"https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/0.png",
"https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/1.png"
],
),
),
),
SizedBox(
height: 77,
),
],
)
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Texts(
width: MediaQuery.of(context).size.width * 0.9, "E-Referral: ",
child: SecondaryButton( fontWeight: FontWeight.normal,
onTap: ()=> Navigator.push(context, FadePage(page: EReferralPage())), fontSize: 25,
label: "E-Referral", color: HexColor("#60686b"),
textColor: Theme.of(context).backgroundColor), ),
SizedBox(
height: 12,
),
Texts(
"This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of HMG Hospitals, By filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)",
fontWeight: FontWeight.normal,
fontSize: 17,
),
SizedBox(
height: 22,
),
Center(
child: SizedBox(
height: MediaQuery.of(context).size.height * 0.55,
width: MediaQuery.of(context).size.width * 0.50,
child: CarouselSlider(
imagesUrlList: [
"https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/0.png",
"https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/1.png"
],
),
),
),
SizedBox(
height: 77,
), ),
], ],
), )),
bottomSheet: Container(
)); height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
onTap: () => Navigator.push(
context, FadePage(page: EReferralPage())),
label: "E-Referral",
textColor: Theme.of(context).backgroundColor),
),
],
),
));
} }
} }

@ -17,6 +17,7 @@ import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dar
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -213,9 +214,8 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
title: TranslationBase.of(context).todoList, title: TranslationBase.of(context).todoList,
), ),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.of(context).pushNamed(
context, SYMPTOM_CHECKER,
FadePage(),
), ),
imageLocation: 'assets/images/new-design/body_icon.png', imageLocation: 'assets/images/new-design/body_icon.png',
title: 'Symptom Checker'), title: 'Symptom Checker'),

@ -23,7 +23,7 @@ class H2OPageIndexPage extends StatelessWidget {
"Water Tracker:", "Water Tracker:",
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 25, fontSize: 25,
color: Hexcolor("#60686b"), color: HexColor("#60686b"),
), ),
SizedBox( SizedBox(
height: 12, height: 12,

@ -6,10 +6,11 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:percent_indicator/circular_percent_indicator.dart';
class TodayPage extends StatelessWidget { class TodayPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<H2OViewModel>( return BaseView<H2OViewModel>(
onModelReady: (model) => model.getUserProgressForTodayData(), onModelReady: (model) => model.getUserProgressForTodayData(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: false, isShowAppBar: false,
@ -27,11 +28,11 @@ class TodayPage extends StatelessWidget {
animation: true, animation: true,
animationDuration: 1200, animationDuration: 1200,
lineWidth: 15.0, lineWidth: 15.0,
percent:model.userProgressData ==null ?0.0: percent: model.userProgressData == null
(model.userProgressData.percentageConsumed / ? 0.0
100) >= 1 ? 1 : (model.userProgressData : (model.userProgressData.percentageConsumed / 100) >= 1
.percentageConsumed / ? 1
100), : (model.userProgressData.percentageConsumed / 100),
//, //,
center: Center( center: Center(
child: Column( child: Column(
@ -46,13 +47,16 @@ class TodayPage extends StatelessWidget {
SizedBox( SizedBox(
height: 4, height: 4,
), ),
Text(model.userProgressData ==null ?"0.0": Text(
model.userProgressData.quantityConsumed model.userProgressData == null
.toString() + 'ml', ? "0.0"
: model.userProgressData.quantityConsumed
.toString() +
'ml',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 20.0, fontSize: 20.0,
color: Hexcolor("#60BCF9")), color: HexColor("#60BCF9")),
), ),
SizedBox( SizedBox(
height: 4, height: 4,
@ -60,9 +64,7 @@ class TodayPage extends StatelessWidget {
SizedBox( SizedBox(
height: 5, height: 5,
width: 50, width: 50,
child: Container( child: Container(),
),
), ),
SizedBox( SizedBox(
height: 4, height: 4,
@ -74,23 +76,28 @@ class TodayPage extends StatelessWidget {
SizedBox( SizedBox(
height: 4, height: 4,
), ),
Text(model.userProgressData ==null ?"0.0": Text(
(model.userProgressData.quantityLimit - model.userProgressData == null
model.userProgressData ? "0.0"
.quantityConsumed) < 0 ? "0 ml" : : (model.userProgressData.quantityLimit -
(model.userProgressData.quantityLimit - model.userProgressData
model.userProgressData .quantityConsumed) <
.quantityConsumed).toString() + ' ml', 0
? "0 ml"
: (model.userProgressData.quantityLimit -
model.userProgressData
.quantityConsumed)
.toString() +
' ml',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold, fontSize: 18.0),
fontSize: 18.0),
), ),
], ],
), ),
), ),
circularStrokeCap: CircularStrokeCap.butt, circularStrokeCap: CircularStrokeCap.butt,
backgroundColor: Hexcolor("#D1E3F6"), backgroundColor: HexColor("#D1E3F6"),
progressColor: Hexcolor("#60BCF9"), progressColor: HexColor("#60BCF9"),
), ),
), ),
Row( Row(
@ -105,9 +112,9 @@ class TodayPage extends StatelessWidget {
height: 30, height: 30,
width: 70, width: 70,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor("#D1E3F6"), color: HexColor("#D1E3F6"),
borderRadius: BorderRadius.all( borderRadius:
Radius.circular(30))), BorderRadius.all(Radius.circular(30))),
), ),
), ),
Text( Text(
@ -125,9 +132,9 @@ class TodayPage extends StatelessWidget {
height: 30, height: 30,
width: 70, width: 70,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor("#60BCF9"), color: HexColor("#60BCF9"),
borderRadius: BorderRadius.all( borderRadius:
Radius.circular(30))), BorderRadius.all(Radius.circular(30))),
), ),
), ),
Text( Text(
@ -143,10 +150,7 @@ class TodayPage extends StatelessWidget {
), ),
SizedBox( SizedBox(
height: 0.5, height: 0.5,
width: MediaQuery width: MediaQuery.of(context).size.width,
.of(context)
.size
.width,
child: Container( child: Container(
color: Colors.grey, color: Colors.grey,
), ),
@ -163,4 +167,3 @@ class TodayPage extends StatelessWidget {
); );
} }
} }

@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';

@ -39,7 +39,7 @@ class MyBalancePage extends StatelessWidget {
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#B61422'), color: HexColor('#B61422'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(7),
), ),
@ -97,7 +97,8 @@ class MyBalancePage extends StatelessWidget {
textColor: Colors.white, textColor: Colors.white,
label: TranslationBase.of(context).createAdvancedPayment, label: TranslationBase.of(context).createAdvancedPayment,
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(
context,
//FadePage(page: AdvancePaymentPage())); //FadePage(page: AdvancePaymentPage()));
FadePage(page: BloodDonationPage())); FadePage(page: BloodDonationPage()));
}, },

@ -47,16 +47,16 @@ class _DoctorProfileState extends State<DoctorProfile>
vsync: this, vsync: this,
initialIndex: widget.isOpenAppt == true ? 1 : 0); initialIndex: widget.isOpenAppt == true ? 1 : 0);
event.controller.stream.listen((p) { // event.controller.stream.listen((p) {
if (p['clinic_id'] != null && // if (p['clinic_id'] != null &&
p['doctor_id'] != null && // p['doctor_id'] != null &&
p['project_id'] != null) { // p['project_id'] != null) {
setState(() { // setState(() {
// need to take the data from here // // need to take the data from here
// dropdownValue = p['clinic_id']; // // dropdownValue = p['clinic_id'];
}); // });
} // }
}); // });
_tabController = new TabController(length: 2, vsync: this); _tabController = new TabController(length: 2, vsync: this);
widget.authUser = new AuthenticatedUser(); widget.authUser = new AuthenticatedUser();
widget.doctor.speciality = widget.docProfileList.specialty; widget.doctor.speciality = widget.docProfileList.specialty;

@ -1,17 +1,18 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/arrow_back.dart';
import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart'; import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
class Search extends StatefulWidget { class Search extends StatefulWidget {
final int type; final int type;
final List clnicIds;
Search({this.type = 0}); Search({this.type = 0, this.clnicIds});
@override @override
_SearchState createState() => _SearchState(); _SearchState createState() => _SearchState();
} }
@ -29,24 +30,35 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
AppGlobal.context = context;
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
bottom: TabBar( bottom: TabBar(
tabs: [ tabs: [
Tab(text: TranslationBase.of(context).clinicName), Tab(text: TranslationBase.of(context).clinicName),
Tab( Tab(
text: TranslationBase.of(context).doctorName, text: TranslationBase.of(context).doctorName,
) )
], ],
controller: _tabController, controller: _tabController,
), ),
title: Text(TranslationBase.of(context).bookAppo, title: Text(TranslationBase.of(context).bookAppo,
style: TextStyle(color: Colors.white)), style: TextStyle(color: Colors.white)),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack();
},
), ),
body: TabBarView( ),
physics: NeverScrollableScrollPhysics(), body: TabBarView(
children: [SearchByClinic(), SearchByDoctor()], physics: NeverScrollableScrollPhysics(),
controller: _tabController), children: [
bottomNavigationBar: BottomBarSearch()); SearchByClinic(
clnicIds: widget.clnicIds,
),
SearchByDoctor()
],
controller: _tabController),
);
} }
} }

@ -1,6 +1,6 @@
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; // import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -19,15 +19,9 @@ class SearchResults extends StatefulWidget {
} }
class _SearchResultsState extends State<SearchResults> { class _SearchResultsState extends State<SearchResults> {
var event = RobotProvider(); // var event = RobotProvider();
List<DoctorList> tempList = []; List<DoctorList> tempList = [];
@override
void initState() {
event.controller.stream.listen((p) {});
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
@ -42,9 +36,14 @@ class _SearchResultsState extends State<SearchResults> {
...List.generate( ...List.generate(
widget.patientDoctorAppointmentListHospital.length, widget.patientDoctorAppointmentListHospital.length,
(index) => AppExpandableNotifier( (index) => AppExpandableNotifier(
title: widget isExpand: index == 1 ? true : false,
.patientDoctorAppointmentListHospital[index].filterName + " - " +widget title: widget.patientDoctorAppointmentListHospital[index]
.patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km, .filterName +
" - " +
widget.patientDoctorAppointmentListHospital[index]
.distanceInKMs +
" " +
TranslationBase.of(context).km,
bodyWidget: Column( bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,

@ -11,10 +11,13 @@ import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'package:smart_progress_bar/smart_progress_bar.dart';
class SearchByClinic extends StatefulWidget { class SearchByClinic extends StatefulWidget {
final List clnicIds;
SearchByClinic({this.clnicIds});
@override @override
_SearchByClinicState createState() => _SearchByClinicState(); _SearchByClinicState createState() => _SearchByClinicState();
} }
@ -23,11 +26,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
bool nearestAppo = false; bool nearestAppo = false;
String dropdownValue; String dropdownValue;
String projectDropdownValue; String projectDropdownValue;
var event = RobotProvider(); // var event = RobotProvider();
List<ListClinicCentralized> clinicsList = []; List<ListClinicCentralized> clinicsList = [];
List<HospitalsModel> projectsList = []; List<HospitalsModel> projectsList = [];
bool isMobileAppDentalAllow = false; bool isMobileAppDentalAllow = false;
bool isLoaded = false;
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList()); WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList());
@ -56,40 +59,70 @@ class _SearchByClinicState extends State<SearchByClinic> {
style: TextStyle(fontSize: 16.0, letterSpacing: 0.9)), style: TextStyle(fontSize: 16.0, letterSpacing: 0.9)),
], ],
), ),
Container( widget.clnicIds != null &&
height: 60.0, widget.clnicIds.length > 1 &&
decoration: BoxDecoration( isLoaded == true
color: Colors.white, ? Column(
border: Border.all( crossAxisAlignment: CrossAxisAlignment.start,
color: Colors.grey[400], children: clinicsList.map<Widget>((result) {
width: 1.0, return RoundedContainer(
), child: ListTile(
borderRadius: BorderRadius.circular(10), onTap: () {
), // setState(() {
// margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 20.0), dropdownValue = result.clinicID.toString();
padding: EdgeInsets.all(8.0), setState(() {
width: MediaQuery.of(context).size.width, if (!isDentalSelectedAndSupported()) {
child: DropdownButtonHideUnderline( projectDropdownValue = "";
child: DropdownButton<String>( getDoctorsList(context);
hint: new Text("Select Clinic"), }
value: dropdownValue, });
items: clinicsList.map((item) { },
return new DropdownMenuItem<String>( // trailing: Icon(TranslationBase.of(AppGlobal.context)
value: item.clinicID.toString(), // .locale
child: new Text(item.clinicDescription), // .languageCode ==
); // 'en'
}).toList(), // ? Icons.keyboard_arrow_right
onChanged: (newValue) { // : Icons.keyboard_arrow_left),
setState(() { title: Text(result.clinicDescription,
dropdownValue = newValue; style: TextStyle(
if (!isDentalSelectedAndSupported() && !nearestAppo) { fontSize: 14.0,
projectDropdownValue = ""; color: Colors.grey[700],
getDoctorsList(context); letterSpacing: 1.0))));
} }).toList())
}); : Container(
}, height: 60.0,
), decoration: BoxDecoration(
)), color: Colors.white,
border: Border.all(
color: Colors.grey[400],
width: 1.0,
),
borderRadius: BorderRadius.circular(10),
),
// margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 20.0),
padding: EdgeInsets.all(8.0),
width: MediaQuery.of(context).size.width,
child: DropdownButtonHideUnderline(
child: DropdownButton<String>(
hint: new Text("Select Clinic"),
value: dropdownValue,
items: clinicsList.map((item) {
return new DropdownMenuItem<String>(
value: item.clinicID.toString(),
child: new Text(item.clinicDescription),
);
}).toList(),
onChanged: (newValue) {
setState(() {
dropdownValue = newValue;
if (!isDentalSelectedAndSupported() && !nearestAppo) {
projectDropdownValue = "";
getDoctorsList(context);
}
});
},
),
)),
isDentalSelectedAndSupported() == true || nearestAppo isDentalSelectedAndSupported() == true || nearestAppo
? Container( ? Container(
height: 60.0, height: 60.0,
@ -168,6 +201,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
}); });
print(projectsList.length); print(projectsList.length);
}); });
filterClinic();
} else {} } else {}
}).catchError((err) { }).catchError((err) {
print(err); print(err);
@ -254,4 +288,17 @@ class _SearchByClinicState extends State<SearchByClinic> {
getProjectsList(); getProjectsList();
}); });
} }
filterClinic() {
setState(() {
if (widget.clnicIds.length > 0) {
clinicsList = clinicsList
.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1)
.toList();
isLoaded = true;
///print(clinicsList);
}
});
}
} }

@ -27,9 +27,11 @@ class _BranchViewState extends State<BranchView> {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true, isShowAppBar: true,
isBottomBar: false,
body: new ListView.builder( body: new ListView.builder(
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return new ExpandableListView( return new ExpandableListView(
isExpanded: index == 0 ? true : false,
result2: widget.result, result2: widget.result,
resultDistance: widget.resultDistance, resultDistance: widget.resultDistance,
val: index, val: index,
@ -46,9 +48,15 @@ class ExpandableListView extends StatefulWidget {
final List<String> resultDistance; final List<String> resultDistance;
final List<DoctorList> doctorsList2; final List<DoctorList> doctorsList2;
final val; final val;
static int doctorListheight = 0;
final bool isExpanded;
const ExpandableListView( const ExpandableListView(
{Key key, this.result2, this.resultDistance, this.val, this.doctorsList2}) {Key key,
this.result2,
this.resultDistance,
this.val,
this.doctorsList2,
this.isExpanded})
: super(key: key); : super(key: key);
@override @override
@ -57,9 +65,17 @@ class ExpandableListView extends StatefulWidget {
class _ExpandableListViewState extends State<ExpandableListView> { class _ExpandableListViewState extends State<ExpandableListView> {
bool expandFlag = false; bool expandFlag = false;
@override
void initState() {
setState(() {
expandFlag = widget.isExpanded;
setDoctorViewHeight(widget.result2[widget.val].toString());
});
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Container( return new Container(
width: MediaQuery.of(context).size.width * 0.6, width: MediaQuery.of(context).size.width * 0.6,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 0.0), margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 0.0),
@ -109,6 +125,10 @@ class _ExpandableListViewState extends State<ExpandableListView> {
onPressed: () { onPressed: () {
setState(() { setState(() {
expandFlag = !expandFlag; expandFlag = !expandFlag;
if (expandFlag == true) {
setDoctorViewHeight(
widget.result2[widget.val].toString());
}
}); });
}), }),
], ],
@ -143,6 +163,11 @@ class _ExpandableListViewState extends State<ExpandableListView> {
); );
} }
setDoctorViewHeight(name) {
ExpandableListView.doctorListheight =
widget.doctorsList2.where((e) => e.projectName == name).toList().length;
}
String getProjectDistance(String distance) { String getProjectDistance(String distance) {
if (distance != "0") if (distance != "0")
return " - " + distance + " " + TranslationBase.of(context).km; return " - " + distance + " " + TranslationBase.of(context).km;
@ -150,6 +175,9 @@ class _ExpandableListViewState extends State<ExpandableListView> {
return ""; return "";
} }
} }
sortByProject() {}
sortByClinic() {}
} }
class ExpandableContainer extends StatelessWidget { class ExpandableContainer extends StatelessWidget {
@ -172,9 +200,12 @@ class ExpandableContainer extends StatelessWidget {
duration: new Duration(milliseconds: 500), duration: new Duration(milliseconds: 500),
curve: Curves.easeInOut, curve: Curves.easeInOut,
width: screenWidth, width: screenWidth,
height: expanded ? MediaQuery.of(context).size.height : collapsedHeight, height: expanded
? (ExpandableListView.doctorListheight * 160).toDouble()
: collapsedHeight,
child: new Container( child: new Container(
child: child, child: child,
padding: EdgeInsets.only(bottom: 30),
decoration: new BoxDecoration( decoration: new BoxDecoration(
border: new Border.all(width: 1.0, color: Colors.white)), border: new Border.all(width: 1.0, color: Colors.white)),
), ),

@ -138,8 +138,7 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
))), //model.cOCItemList[index].cOCTitl ))), //model.cOCItemList[index].cOCTitl
IconButton( IconButton(
icon: Icon( icon: Icon(
Icons Icons.arrow_forward_ios,
.arrow_forward_ios,
color: color:
tappedIndex == index tappedIndex == index
? Colors.white ? Colors.white

@ -1,4 +1,7 @@
import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCardView.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCardView.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
@ -30,7 +32,7 @@ class _MyAppointmentsState extends State<MyAppointments>
TabController _tabController; TabController _tabController;
bool isDataLoaded = false; bool isDataLoaded = false;
var sharedPref = new AppSharedPreferences();
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 3, vsync: this); _tabController = new TabController(length: 3, vsync: this);
@ -203,100 +205,114 @@ class _MyAppointmentsState extends State<MyAppointments>
}); });
} }
openAppointmentsTab() { openAppointmentsTab() async {
if (widget._patientBookedAppointmentListHospital.length != 0) { var flag = await this.sharedPref.getInt(IS_SEARCH_APPO);
if (flag == 1) {
_tabController.index = 0; _tabController.index = 0;
} else if (widget._patientConfirmedAppointmentListHospital.length != 0) { } else if (flag == 2) {
_tabController.index = 1; _tabController.index = 1;
} else if (widget._patientArrivedAppointmentListHospital.length != 0) { } else if (flag == 3) {
_tabController.index = 2; _tabController.index = 2;
return; } else {
if (widget._patientBookedAppointmentListHospital.length != 0) {
_tabController.index = 0;
} else if (widget._patientConfirmedAppointmentListHospital.length != 0) {
_tabController.index = 1;
} else if (widget._patientArrivedAppointmentListHospital.length != 0) {
_tabController.index = 2;
return;
}
} }
} }
Widget getBookedAppointments() { Widget getBookedAppointments() {
return Container( return Container(
child: widget.bookedAppoList.length != 0 child: widget.bookedAppoList.length != 0
? new ListView.builder( ? new ListView.builder(
itemCount: widget.bookedAppoList.length, itemCount: widget.bookedAppoList.length,
itemBuilder: (context, i) { itemBuilder: (context, i) {
return AppointmentCard( return AppointmentCard(
appo: widget.bookedAppoList[i], appo: widget.bookedAppoList[i],
onReloadAppointmentHistory: getPatientAppointmentHistory, onReloadAppointmentHistory: getPatientAppointmentHistory,
); );
}, },
) )
: Container( : Container(
child: Center( child: Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Image.asset( // Image.asset(
"assets/images/new-design/noAppointmentIcon.png"), // "assets/images/new-design/noAppointmentIcon.png"),
Container( // Container(
margin: EdgeInsets.only(top: 10.0), // margin: EdgeInsets.only(top: 10.0),
child: Text(TranslationBase.of(context).noBookedAppointments, // child: Text(TranslationBase.of(context).noBookedAppointments,
style: TextStyle( // style: TextStyle(
fontSize: 16.0, // fontSize: 16.0,
)), // )),
), // ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Container( child: Container(
child: widget.bookedAppoList.length != 0 child: widget.bookedAppoList.length != 0
? SingleChildScrollView( ? SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
...List.generate( ...List.generate(
widget._patientBookedAppointmentListHospital.length, widget._patientBookedAppointmentListHospital
.length,
(index) => AppExpandableNotifier( (index) => AppExpandableNotifier(
title: widget title: widget
._patientBookedAppointmentListHospital[index] ._patientBookedAppointmentListHospital[
.filterName, index]
bodyWidget: Column( .filterName,
crossAxisAlignment: CrossAxisAlignment.start, bodyWidget: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment:
children: widget CrossAxisAlignment.start,
._patientBookedAppointmentListHospital[index] mainAxisAlignment:
.patientDoctorAppointmentList MainAxisAlignment.spaceBetween,
.map((doctor) { children: widget
return AppointmentCard( ._patientBookedAppointmentListHospital[
appo: doctor, index]
onReloadAppointmentHistory: .patientDoctorAppointmentList
getPatientAppointmentHistory, .map((doctor) {
); return AppointmentCard(
}).toList(), appo: doctor,
)), onReloadAppointmentHistory:
) getPatientAppointmentHistory,
], );
), }).toList(),
) )),
: Container( )
child: Center( ],
child: Column( ),
mainAxisAlignment: MainAxisAlignment.center, )
crossAxisAlignment: CrossAxisAlignment.center, : Container(
children: <Widget>[ child: Center(
Image.asset( child: Column(
"assets/images/new-design/noAppointmentIcon.png"), mainAxisAlignment: MainAxisAlignment.center,
Container( crossAxisAlignment: CrossAxisAlignment.center,
margin: EdgeInsets.only(top: 10.0), children: <Widget>[
child: Text("No Booked Appointments", Image.asset(
style: TextStyle( "assets/images/new-design/noAppointmentIcon.png"),
fontSize: 16.0, Container(
)), margin: EdgeInsets.only(top: 10.0),
child: Text("No Booked Appointments",
style: TextStyle(
fontSize: 16.0,
)),
),
],
), ),
], ),
), ),
), ),
), )
), ],
) ))));
],
))));
} }
Widget getConfirmedAppointments() { Widget getConfirmedAppointments() {
@ -341,7 +357,8 @@ class _MyAppointmentsState extends State<MyAppointments>
Image.asset("assets/images/new-design/noAppointmentIcon.png"), Image.asset("assets/images/new-design/noAppointmentIcon.png"),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(TranslationBase.of(context).noConfirmedAppointments , child: Text(
TranslationBase.of(context).noConfirmedAppointments,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
)), )),
@ -363,23 +380,24 @@ class _MyAppointmentsState extends State<MyAppointments>
...List.generate( ...List.generate(
widget._patientArrivedAppointmentListHospital.length, widget._patientArrivedAppointmentListHospital.length,
(index) => AppExpandableNotifier( (index) => AppExpandableNotifier(
title: widget title: widget
._patientArrivedAppointmentListHospital[index]
.filterName,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: widget
._patientArrivedAppointmentListHospital[index] ._patientArrivedAppointmentListHospital[index]
.filterName, .patientDoctorAppointmentList
bodyWidget: Column( .map((doctor) {
crossAxisAlignment: CrossAxisAlignment.start, return AppointmentCard(
mainAxisAlignment: MainAxisAlignment.spaceBetween, appo: doctor,
children: widget onReloadAppointmentHistory:
._patientArrivedAppointmentListHospital[index] getPatientAppointmentHistory,
.patientDoctorAppointmentList );
.map((doctor) { }).toList(),
return AppointmentCard( ),
appo: doctor, ),
onReloadAppointmentHistory:
getPatientAppointmentHistory,
);
}).toList(),
)),
) )
], ],
), ),
@ -394,10 +412,11 @@ class _MyAppointmentsState extends State<MyAppointments>
Image.asset("assets/images/new-design/noAppointmentIcon.png"), Image.asset("assets/images/new-design/noAppointmentIcon.png"),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(TranslationBase.of(context).noArrivedAppointments, child:
style: TextStyle( Text(TranslationBase.of(context).noArrivedAppointments,
fontSize: 16.0, style: TextStyle(
)), fontSize: 16.0,
)),
), ),
], ],
), ),

@ -24,7 +24,7 @@ class _ApointmentCardState extends State<AppointmentCard> {
navigateToAppointmentDetails(context, widget.appo); navigateToAppointmentDetails(context, widget.appo);
}, },
child: Card( child: Card(
margin: EdgeInsets.fromLTRB(10.0, 16.0, 10.0, 8.0), // margin: EdgeInsets.fromLTRB(10.0, 16.0, 10.0, 8.0),
color: Colors.white, color: Colors.white,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
@ -95,7 +95,8 @@ class _ApointmentCardState extends State<AppointmentCard> {
emptyIcon: Icons.star, emptyIcon: Icons.star,
), ),
Container( Container(
transform: Matrix4.translationValues(15.0, -40.0, 0.0), transform:
Matrix4.translationValues(15.0, -40.0, 0.0),
child: Image.asset( child: Image.asset(
"assets/images/new-design/arrow.png", "assets/images/new-design/arrow.png",
width: 25.0, width: 25.0,

@ -1,114 +1,358 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
class MyFamily extends StatelessWidget { class MyFamily extends StatefulWidget {
//bool isLoading = true; @override
_MyFamily createState() => _MyFamily();
}
class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
final familyFileProvider = FamilyFilesProvider(); final familyFileProvider = FamilyFilesProvider();
AppSharedPreferences sharedPref = new AppSharedPreferences(); AppSharedPreferences sharedPref = new AppSharedPreferences();
var userID; var userID;
TabController _tabController;
@override
void initState() {
_tabController = new TabController(length: 2, vsync: this, initialIndex: 0);
super.initState();
}
bool expandFlag = false;
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return Scaffold(
appBarTitle: TranslationBase.of(context).myFamilyFiles, appBar: AppBar(
isShowAppBar: true, bottom: TabBar(
body: DefaultTabController( indicatorColor: Colors.red,
length: 2, tabs: [
child: SingleChildScrollView( Padding(
padding: EdgeInsets.all(20), padding: EdgeInsets.all(6),
child: Container( child: AppText(
height: SizeConfig.realScreenHeight, TranslationBase.of(context).family,
width: SizeConfig.realScreenWidth, color: Colors.white,
child: Stack( )),
children: <Widget>[ Padding(
TabBar( padding: EdgeInsets.all(6),
indicatorColor: Colors.red, child: AppText(
tabs: [ TranslationBase.of(context).request,
Padding( color: Colors.white,
padding: EdgeInsets.all(6), )),
child: ],
Text(TranslationBase.of(context).family)), controller: _tabController,
Padding( ),
padding: EdgeInsets.all(6), title: AppText(TranslationBase.of(context).myFamilyFiles,
child: color: Colors.white)),
Text(TranslationBase.of(context).request)), body: TabBarView(
], // physics: NeverScrollableScrollPhysics(),
), children: [myFamilyDetails(context), myFamilyRequest(context)],
TabBarView( controller: _tabController),
children: [ bottomNavigationBar: BottomBarSearch());
myFamilyDetails(context),
myFamilyRequest(context) // AppScaffold(
], // appBarTitle: TranslationBase.of(context).myFamilyFiles,
) // isShowAppBar: true,
], // body: SingleChildScrollView(
))))); // child: Container(
// height: SizeConfig.screenHeight,
// width: SizeConfig.realScreenWidth,
// padding: EdgeInsets.all(20),
// child: Stack(
// children: <Widget>[
// TabBar(
// controller: _tabController,
// indicatorColor: Colors.red,
// tabs: [
// Padding(
// padding: EdgeInsets.all(6),
// child: Text(TranslationBase.of(context).family)),
// Padding(
// padding: EdgeInsets.all(6),
// child: Text(TranslationBase.of(context).request)),
// ],
// ),
// TabBarView(
// controller: _tabController,
// children: [
// myFamilyDetails(context),
// myFamilyRequest(context)
// ],
// )
// ],
// ))));
} }
Widget myFamilyDetails(context) { Widget myFamilyDetails(context) {
return // Padding( return Container(
//padding: EdgeInsets.only(top: 50), height: MediaQuery.of(context).size.height,
//child: margin: EdgeInsets.fromLTRB(20.0, 0, 20.0, 0.0),
Column( child: Column(
// mainAxisAlignment: MainAxisAlignment.start, children: <Widget>[
children: <Widget>[ Expanded(
Expanded( flex: 4,
flex: 3, child: FutureBuilder(
child: FutureBuilder( future: getFamilyFiles(), // async work
future: getFamilyFiles(), // async work builder: (BuildContext context,
builder: (BuildContext context, AsyncSnapshot<GetAllSharedRecordsByStatusResponse>
AsyncSnapshot<GetAllSharedRecordsByStatusResponse> snapshot) { snapshot) {
switch (snapshot.connectionState) { switch (snapshot.connectionState) {
case ConnectionState.waiting: case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.only(top: 50),
child: Text('Loading....'));
default:
if (snapshot.hasError)
return Padding(
padding: EdgeInsets.all(10),
child: Text(snapshot.error));
else
return Padding( return Padding(
padding: EdgeInsets.only(top: 50), padding: EdgeInsets.only(top: 50),
child: Column(children: <Widget>[ child: Text('Loading....'));
Row( default:
mainAxisAlignment: MainAxisAlignment.spaceBetween, if (snapshot.hasError)
children: <Widget>[ return Padding(
Expanded( padding: EdgeInsets.all(10),
flex: 3, child: Text("No data found"));
child: Text( else
TranslationBase.of(context).request)), return Padding(
Expanded( padding: EdgeInsets.only(top: 50),
flex: 2, child: Column(children: <Widget>[
child: Text( Row(
TranslationBase.of(context).switchUser, mainAxisAlignment:
)), MainAxisAlignment.spaceBetween,
Expanded( children: <Widget>[
flex: 1, Expanded(
child: Text( flex: 3,
TranslationBase.of(context).deleteView, child: Text(
)), TranslationBase.of(context).request)),
Expanded(
flex: 2,
child: Text(
TranslationBase.of(context).switchUser,
)),
Expanded(
flex: 1,
child: Text(
TranslationBase.of(context).deleteView,
)),
],
),
Column(
mainAxisAlignment: MainAxisAlignment.start,
children: snapshot
.data.getAllSharedRecordsByStatusList
.map<Widget>((result) {
return result.status == 3
? Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child: Text(
result.patientName)),
Expanded(
flex: 2,
child: IconButton(
icon: Icon(Icons.group),
color: Colors.black,
onPressed: () {
switchUser(
result, context);
},
)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.delete,
color: Colors.black,
),
onPressed: () {
deleteFamily(
result, context);
},
)),
],
))
: SizedBox();
}).toList())
]));
}
},
),
),
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: DefaultButton(
TranslationBase.of(context).addFamilyMember,
() => {
Navigator.of(context)
.pushNamed(ADD_FAMILY_MEMBER_TYPE)
},
color: Colors.grey[900],
textColor: Colors.white,
))
],
),
],
),
)
],
));
}
Widget myFamilyRequest(context) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Column(
children: <Widget>[
// SizedBox(height: 20.0),
RoundedContainer(
child: ExpansionTile(
title: Text(
TranslationBase.of(context).userViewRequest,
style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
),
children: <Widget>[
FutureBuilder(
future: getUserViewRequest(), // async work
builder: (BuildContext context,
AsyncSnapshot<dynamic> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.only(top: 50),
child: Text('Loading....'));
default:
if (snapshot.hasError)
return Padding(
padding: EdgeInsets.all(10),
child: Text('No data found'));
else
return Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 3,
child: Text(TranslationBase.of(context)
.request)),
Expanded(
flex: 2,
child: Text(
TranslationBase.of(context)
.switchUser,
)),
Expanded(
flex: 1,
child: Text(
TranslationBase.of(context)
.deleteView,
)),
],
),
Column(children: [
Row(children: [
Expanded(flex: 3, child: AppText('Name')),
Expanded(flex: 1, child: AppText('Allow')),
Expanded(flex: 1, child: AppText('Reject')),
]),
Column(
children: snapshot
.data['GetAllPendingRecordsList']
.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child:
Text(result.patientName)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.check_circle,
color: Colors.black,
),
onPressed: () {
acceptRequest(
result, context);
},
)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.delete,
color: Colors.black,
),
onPressed: () {
deleteRequest(
result, context);
},
))
],
));
}).toList())
])
], ],
), );
Column( }
mainAxisAlignment: MainAxisAlignment.start, })
children: snapshot ],
.data.getAllSharedRecordsByStatusList ),
.map<Widget>((result) { ),
return result.status == 3 RoundedContainer(
? Padding( child: ExpansionTile(
title: Text(
TranslationBase.of(context).sentRequest,
style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
),
children: <Widget>[
FutureBuilder(
future: getSentRequest(), // async work
builder: (BuildContext context,
AsyncSnapshot<GetAllSharedRecordsByStatusResponse>
snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.only(top: 50),
child: Text('Loading....'));
default:
if (snapshot.hasError)
return Padding(
padding: EdgeInsets.all(10),
child: Text('No data found'));
else
return SingleChildScrollView(
child: Container(
height: SizeConfig.screenHeight * .3,
child: ListView(
children: snapshot
.data.getAllSharedRecordsByStatusList
.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
@ -118,61 +362,102 @@ class MyFamily extends StatelessWidget {
Text(result.patientName)), Text(result.patientName)),
Expanded( Expanded(
flex: 2, flex: 2,
child: IconButton( child: AppText(
icon: Icon(Icons.group), result.statusDescription,
color: Colors.black, color: Colors.red,
onPressed: () {
switchUser(
result, context);
},
)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.delete,
color: Colors.black,
),
onPressed: () {
deleteFamily(
result, context);
},
)), )),
], ],
)) ));
: SizedBox(); }).toList(),
)));
}
})
],
)),
RoundedContainer(
child: ExpansionTile(
title: Text(
TranslationBase.of(context).userView,
style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
),
children: <Widget>[
FutureBuilder(
future: getUserViewRequest(), // async work
builder:
(BuildContext context, AsyncSnapshot<dynamic> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.only(top: 50),
child: Text('Loading....'));
default:
if (snapshot.hasError)
return Padding(
padding: EdgeInsets.all(10),
child: Text('No data found'));
else
return Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 3,
child: Text(
TranslationBase.of(context).request)),
Expanded(
flex: 2,
child: Text(
TranslationBase.of(context).switchUser,
)),
Expanded(
flex: 1,
child: Text(
TranslationBase.of(context).deleteView,
)),
],
),
Column(children: [
Row(children: [
Expanded(flex: 3, child: AppText('Name')),
Expanded(flex: 1, child: AppText('Delete')),
]),
Column(
children: snapshot
.data['GetAllPendingRecordsList']
.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child: Text(result.patientName)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.delete,
color: Colors.black,
),
onPressed: () {
deleteRequest(
result, context);
},
)),
],
));
}).toList()) }).toList())
])); ])
} ],
}, );
)), }
Expanded( })
flex: 1, ],
child: Column( ))
children: <Widget>[ ],
Row( ),
children: <Widget>[
Expanded(
child: DefaultButton(
TranslationBase.of(context).addFamilyMember,
() => {
Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER_TYPE)
},
color: Colors.grey[900],
textColor: Colors.white,
))
],
),
],
))
],
);
}
addMember() {}
Widget myFamilyRequest(context) {
return Column(
children: <Widget>[],
); );
} }
@ -186,6 +471,16 @@ class MyFamily extends StatelessWidget {
} }
} }
Future getUserViewRequest() async {
var user = await sharedPref.getObject(USER_PROFILE);
return familyFileProvider.getUserViewRequest(user['PatientID']);
}
Future<GetAllSharedRecordsByStatusResponse> getSentRequest() async {
// var user = await sharedPref.getObject(USER_PROFILE);
return familyFileProvider.getUserSentRequest();
}
deleteFamily(family, context) { deleteFamily(family, context) {
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
context: context, context: context,
@ -236,4 +531,7 @@ class MyFamily extends StatelessWidget {
HOME, HOME,
); );
} }
deleteRequest(result, context) {}
acceptRequest(result, context) {}
} }

@ -33,6 +33,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isBottomBar: false,
appBarTitle: 'Feedback', appBarTitle: 'Feedback',
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
@ -62,8 +63,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
color: Theme.of(context).dividerColor, color: Theme.of(context).dividerColor, width: 0.7),
width: 0.7),
), ),
color: Colors.white), color: Colors.white),
child: Center( child: Center(
@ -75,7 +75,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
indicatorColor: Colors.red[800], indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Container(
@ -104,10 +104,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
child: TabBarView( child: TabBarView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[SendFeedbackPage(), StatusFeedbackPage()],
SendFeedbackPage(),
StatusFeedbackPage()
],
), ),
) )
], ],

@ -208,7 +208,7 @@ class _HomePageState extends State<HomePage> {
width: double.infinity, width: double.infinity,
height: 125, height: 125,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#A59E9E'), color: HexColor('#A59E9E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, width: 0.5), color: Colors.transparent, width: 0.5),
@ -254,7 +254,7 @@ class _HomePageState extends State<HomePage> {
width: 90, width: 90,
height: 30, height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#D81A2E'), color: HexColor('#D81A2E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, color: Colors.transparent,
@ -281,7 +281,7 @@ class _HomePageState extends State<HomePage> {
width: double.infinity, width: double.infinity,
height: 130, height: 130,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#A59E9E'), color: HexColor('#A59E9E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, width: 0.5), color: Colors.transparent, width: 0.5),
@ -341,7 +341,7 @@ class _HomePageState extends State<HomePage> {
width: 90, width: 90,
height: 30, height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#D81A2E'), color: HexColor('#D81A2E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, color: Colors.transparent,
@ -449,7 +449,7 @@ class _HomePageState extends State<HomePage> {
height: 50, height: 50,
), ),
SizedBox( SizedBox(
height: 13.5, height: 3,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context)
@ -486,7 +486,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
bold: true, bold: true,
fontSize: SizeConfig.textMultiplier * 2.0, fontSize: SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
@ -507,21 +507,21 @@ class _HomePageState extends State<HomePage> {
height: 50, height: 50,
), ),
SizedBox( SizedBox(
height: 15, height: 3,
), ),
Texts( Texts(
TranslationBase.of(context).emergencyService, TranslationBase.of(context).emergencyService,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
bold: true, bold: true,
fontSize: SizeConfig.textMultiplier * 2.0, fontSize: SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
), ),
), ),
height: MediaQuery.of(context).size.width * 0.4, height: MediaQuery.of(context).size.width * 0.4,
color: Hexcolor("#747C80"), color: HexColor("#747C80"),
imageName: 'emergency_service_image.png', imageName: 'emergency_service_image.png',
), ),
], ],
@ -550,7 +550,7 @@ class _HomePageState extends State<HomePage> {
height: 55, height: 55,
), ),
SizedBox( SizedBox(
height: 15, height: 5,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context)
@ -558,7 +558,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
fontSize: SizeConfig.textMultiplier * 2, fontSize: SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
@ -582,7 +582,7 @@ class _HomePageState extends State<HomePage> {
height: 55, height: 55,
), ),
SizedBox( SizedBox(
height: 15, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context)
@ -590,7 +590,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
fontSize: SizeConfig.textMultiplier * 2, fontSize: SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
@ -622,7 +622,7 @@ class _HomePageState extends State<HomePage> {
height: 50, height: 50,
), ),
SizedBox( SizedBox(
height: 15, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context)
@ -630,7 +630,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
fontSize: SizeConfig.textMultiplier * 2.0, fontSize: SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
@ -648,7 +648,7 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
SizedBox( SizedBox(
height: 8, height: 5,
), ),
Container( Container(
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 15),
@ -686,7 +686,7 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
height: 100, height: 100,
imageName: 'hmg_services_bg .png', imageName: 'hmg_services_bg.png',
opacity: 0.5, opacity: 0.5,
color: Colors.grey[700], color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,
@ -788,7 +788,9 @@ class DashboardItem extends StatelessWidget {
: MediaQuery.of(context).size.height * 0.35, : MediaQuery.of(context).size.height * 0.35,
decoration: BoxDecoration( decoration: BoxDecoration(
color: !hasBorder color: !hasBorder
? color != null ? color : Hexcolor('#050705').withOpacity(opacity) ? color != null
? color
: HexColor('#050705').withOpacity(opacity)
: Colors.white, : Colors.white,
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
border: hasBorder border: hasBorder
@ -796,7 +798,7 @@ class DashboardItem extends StatelessWidget {
: Border.all(width: 0.0, color: Colors.transparent), : Border.all(width: 0.0, color: Colors.transparent),
image: imageName != null image: imageName != null
? DecorationImage( ? DecorationImage(
image: AssetImage('assets/images/$imageName'), image: ExactAssetImage('assets/images/$imageName'),
fit: BoxFit.cover, fit: BoxFit.cover,
colorFilter: new ColorFilter.mode( colorFilter: new ColorFilter.mode(
Colors.black.withOpacity(0.2), BlendMode.dstIn), Colors.black.withOpacity(0.2), BlendMode.dstIn),

@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/my_admissions_page.dart'; import 'package:diplomaticquarterapp/pages/medical/my_admissions_page.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -23,6 +24,7 @@ import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:flutter_svg/svg.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:rxdart/rxdart.dart'; import 'package:rxdart/rxdart.dart';
@ -44,17 +46,19 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
ProjectViewModel projectProvider; ProjectViewModel projectProvider;
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
final authService = new AuthProvider(); final authService = new AuthProvider();
var event = RobotProvider();
void _requestIOSPermissions() { void _requestIOSPermissions() {
flutterLocalNotificationsPlugin flutterLocalNotificationsPlugin
.resolvePlatformSpecificImplementation< .resolvePlatformSpecificImplementation<
IOSFlutterLocalNotificationsPlugin>() IOSFlutterLocalNotificationsPlugin>()
?.requestPermissions( ?.requestPermissions(
alert: true, alert: true,
badge: true, badge: true,
sound: true, sound: true,
); );
} }
bool isPageNavigated = false; bool isPageNavigated = false;
_changeCurrentTab(int tab) { _changeCurrentTab(int tab) {
@ -138,123 +142,121 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
//_firebase Background message handler //_firebase Background message handler
_firebaseMessaging.configure( _firebaseMessaging.configure(
// onMessage: (Map<String, dynamic> message) async { // onMessage: (Map<String, dynamic> message) async {
// showDialog("onMessage: $message"); // showDialog("onMessage: $message");
// print("onMessage: $message"); // print("onMessage: $message");
// print(message); // print(message);
// print(message['name']); // print(message['name']);
// print(message['appointmentdate']); // print(message['appointmentdate']);
// //
// if (Platform.isIOS) { // if (Platform.isIOS) {
// if (message['is_call'] == "true") { // if (message['is_call'] == "true") {
// var route = ModalRoute.of(context); // var route = ModalRoute.of(context);
// //
// if (route != null) { // if (route != null) {
// print(route.settings.name); // print(route.settings.name);
// } // }
// //
// Map<String, dynamic> myMap = new Map<String, dynamic>.from(message); // Map<String, dynamic> myMap = new Map<String, dynamic>.from(message);
// print(myMap); // print(myMap);
// LandingPage.isOpenCallPage = true; // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // if (!isPageNavigated) {
// isPageNavigated = true; // isPageNavigated = true;
// Navigator.push( // Navigator.push(
// context, // context,
// MaterialPageRoute( // MaterialPageRoute(
// builder: (context) => IncomingCall( // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // .then((value) {
// isPageNavigated = false; // isPageNavigated = false;
// }); // });
// } // }
// } else { // } else {
// print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
// } // }
// } else { // } else {
// print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
// } // }
// //
// if (Platform.isAndroid) { // if (Platform.isAndroid) {
// if (message['data'].containsKey("is_call")) { // if (message['data'].containsKey("is_call")) {
// var route = ModalRoute.of(context); // var route = ModalRoute.of(context);
// //
// if (route != null) { // if (route != null) {
// print(route.settings.name); // print(route.settings.name);
// } // }
// //
// Map<String, dynamic> myMap = // Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message['data']); // new Map<String, dynamic>.from(message['data']);
// print(myMap); // print(myMap);
// LandingPage.isOpenCallPage = true; // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // if (!isPageNavigated) {
// isPageNavigated = true; // isPageNavigated = true;
// Navigator.push( // Navigator.push(
// context, // context,
// MaterialPageRoute( // MaterialPageRoute(
// builder: (context) => IncomingCall( // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // .then((value) {
// isPageNavigated = false; // isPageNavigated = false;
// }); // });
// } // }
// } else { // } else {
// print("Is Call Not Found Android"); // print("Is Call Not Found Android");
// } // }
// } else { // } else {
// print("Is Call Not Found Android"); // print("Is Call Not Found Android");
// } // }
// }, // },
// onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler, // onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
// onLaunch: (Map<String, dynamic> message) async { // onLaunch: (Map<String, dynamic> message) async {
// print("onLaunch: $message"); // print("onLaunch: $message");
// showDialog("onLaunch: $message"); // showDialog("onLaunch: $message");
// }, // },
// onResume: (Map<String, dynamic> message) async { // onResume: (Map<String, dynamic> message) async {
// print("onResume: $message"); // print("onResume: $message");
// print(message); // print(message);
// print(message['name']); // print(message['name']);
// print(message['appointmentdate']); // print(message['appointmentdate']);
// //
// showDialog("onResume: $message"); // showDialog("onResume: $message");
// //
// if (Platform.isIOS) { // if (Platform.isIOS) {
// if (message['is_call'] == "true") { // if (message['is_call'] == "true") {
// var route = ModalRoute.of(context); // var route = ModalRoute.of(context);
// //
// if (route != null) { // if (route != null) {
// print(route.settings.name); // print(route.settings.name);
// } // }
// //
// Map<String, dynamic> myMap = // Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message); // new Map<String, dynamic>.from(message);
// print(myMap); // print(myMap);
// LandingPage.isOpenCallPage = true; // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // if (!isPageNavigated) {
// isPageNavigated = true; // isPageNavigated = true;
// Navigator.push( // Navigator.push(
// context, // context,
// MaterialPageRoute( // MaterialPageRoute(
// builder: (context) => IncomingCall( // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // .then((value) {
// isPageNavigated = false; // isPageNavigated = false;
// }); // });
// } // }
// } else { // } else {
// print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
// } // }
// } else { // } else {
// print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
// } // }
// }, // },
); );
} }
showDialogs(String message) { showDialogs(String message) {
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
context: context, context: context,
@ -284,12 +286,11 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
return; return;
} }
} }
} }
Future<void> _scheduleNotification() async { Future<void> _scheduleNotification() async {
var scheduledNotificationDateTime = var scheduledNotificationDateTime =
DateTime.now().add(Duration(seconds: 5)); DateTime.now().add(Duration(seconds: 5));
var vibrationPattern = Int64List(4); var vibrationPattern = Int64List(4);
vibrationPattern[0] = 0; vibrationPattern[0] = 0;
vibrationPattern[1] = 1000; vibrationPattern[1] = 1000;
@ -300,7 +301,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
'your other channel id', 'your other channel id',
'your other channel name', 'your other channel name',
'your other channel description', 'your other channel description',
// icon: 'secondary_icon', // icon: 'secondary_icon',
sound: RawResourceAndroidNotificationSound('slow_spring_board'), sound: RawResourceAndroidNotificationSound('slow_spring_board'),
largeIcon: DrawableResourceAndroidBitmap('sample_large_icon'), largeIcon: DrawableResourceAndroidBitmap('sample_large_icon'),
vibrationPattern: vibrationPattern, vibrationPattern: vibrationPattern,
@ -310,18 +311,17 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
ledOnMs: 1000, ledOnMs: 1000,
ledOffMs: 500); ledOffMs: 500);
var iOSPlatformChannelSpecifics = var iOSPlatformChannelSpecifics =
IOSNotificationDetails(sound: 'slow_spring_board.aiff'); IOSNotificationDetails(sound: 'slow_spring_board.aiff');
var platformChannelSpecifics = NotificationDetails( // var platformChannelSpecifics = NotificationDetails(
androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics); // androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.schedule( // await flutterLocalNotificationsPlugin.schedule(
0, // 0,
'scheduled title', // 'scheduled title',
'scheduled body', // 'scheduled body',
scheduledNotificationDateTime, // scheduledNotificationDateTime,
platformChannelSpecifics); // platformChannelSpecifics);
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
//final searchValue = Provider.of<SearchProvider>(context); //final searchValue = Provider.of<SearchProvider>(context);
@ -345,6 +345,16 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
); );
}, },
), ),
actions: [
IconButton(
iconSize: 70,
icon: SvgPicture.asset('assets/images/svg/robort_svg.svg',
height: 100, width: 100, fit: BoxFit.cover),
onPressed: () {
triggerRobot();
} //do something,
)
],
centerTitle: true, centerTitle: true,
), ),
drawer: SafeArea(child: AppDrawer()), drawer: SafeArea(child: AppDrawer()),
@ -371,6 +381,10 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
); );
} }
triggerRobot() {
event.setValue({"isRobot": 'true'});
}
getText(currentTab) { getText(currentTab) {
switch (currentTab) { switch (currentTab) {
case 0: case 0:

@ -21,6 +21,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:local_auth/local_auth.dart'; import 'package:local_auth/local_auth.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class ConfirmLogin extends StatefulWidget { class ConfirmLogin extends StatefulWidget {
@override @override
@ -75,183 +76,170 @@ class _ConfirmLogin extends State<ConfirmLogin> {
appBarTitle: TranslationBase.of(context).confirm, appBarTitle: TranslationBase.of(context).confirm,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
body: isLoading == false body: SingleChildScrollView(
? SingleChildScrollView( child: Container(
child: Container( padding: EdgeInsets.all(20),
padding: EdgeInsets.all(20), height: SizeConfig.realScreenHeight * .9,
height: SizeConfig.realScreenHeight * .9, width: SizeConfig.realScreenWidth,
width: SizeConfig.realScreenWidth, child: Column(
child: Column( children: <Widget>[
children: <Widget>[ Expanded(
Expanded( flex: 3,
flex: 3, child: user != null && isMoreOption == false
child: user != null && isMoreOption == false ? Column(
? Column( mainAxisAlignment:
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: children: <Widget>[
CrossAxisAlignment.start, Image.asset(
children: <Widget>[ 'assets/images/habib-logo.png',
Image.asset( height: 80,
'assets/images/habib-logo.png', width: 80,
height: 80, ),
width: 80, AppText(
), TranslationBase.of(context).welcomeBack +
AppText( ' ' +
TranslationBase.of(context) user.name,
.welcomeBack + fontSize: SizeConfig.textMultiplier * 3.5,
' ' + ),
user.name, AppText(
fontSize: SizeConfig.textMultiplier * 4, TranslationBase.of(context).accountInfo,
), fontSize: SizeConfig.textMultiplier * 2.5,
AppText( ),
TranslationBase.of(context).accountInfo, Card(
fontSize: SizeConfig.textMultiplier * 3, color: Colors.grey[300],
), child: Row(
Card( children: <Widget>[
color: Colors.grey[300], Expanded(
child: Row( child: ListTile(
children: <Widget>[ title: Text(
Expanded( TranslationBase.of(context)
child: ListTile( .lastLoginAt,
title: Text( textAlign: TextAlign.center,
TranslationBase.of(context) ),
.lastLoginAt, subtitle: Text(
textAlign: TextAlign.center, user.editedOn != null
), ? formatDate(DateUtil
subtitle: Text( .convertStringToDate(
user.editedOn != null user.editedOn))
? formatDate(DateUtil : '--',
.convertStringToDate( textAlign: TextAlign.center),
user.editedOn)) )),
: '--', Expanded(
textAlign: child: ListTile(
TextAlign.center), title: Text(
)),
Expanded(
child: ListTile(
title: Text(
TranslationBase.of(context)
.lastLoginWith,
textAlign:
TextAlign.center),
subtitle: Text(
getType(user.logInType,
context),
textAlign:
TextAlign.center),
))
],
))
],
)
: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Image.asset(
'assets/images/habib-logo.png',
height: 80,
width: 80,
),
this.onlySMSBox == false
? AppText(
TranslationBase.of(context)
.verifyLoginWith,
fontSize:
SizeConfig.textMultiplier *
3.5,
textAlign: TextAlign.left,
)
: AppText(
TranslationBase.of(context) TranslationBase.of(context)
.verifyFingerprint2, .lastLoginWith,
fontSize: textAlign: TextAlign.center),
SizeConfig.textMultiplier * subtitle: Text(
2.5, getType(
textAlign: TextAlign.left, user.logInType, context),
), textAlign: TextAlign.center),
])), ))
user != null && isMoreOption == false ],
? Expanded( ))
flex: 2, ],
child: Column( )
mainAxisAlignment: MainAxisAlignment.start, : Column(
crossAxisAlignment: mainAxisAlignment:
CrossAxisAlignment.start, MainAxisAlignment.spaceEvenly,
children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.start,
Row( children: <Widget>[
Image.asset(
'assets/images/habib-logo.png',
height: 80,
width: 80,
),
this.onlySMSBox == false
? AppText(
TranslationBase.of(context)
.verifyLoginWith,
fontSize:
SizeConfig.textMultiplier * 3.5,
textAlign: TextAlign.left,
)
: AppText(
TranslationBase.of(context)
.verifyFingerprint2,
fontSize:
SizeConfig.textMultiplier * 2.5,
textAlign: TextAlign.left,
),
])),
user != null && isMoreOption == false
? Expanded(
flex: 2,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: InkWell(
onTap: () => {
authenticateUser(
3,
BiometricType
.face.index)
},
child:
getButton(user.logInType))),
Expanded(child: getButton(5))
])
]))
: Expanded(
flex: 4,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
onlySMSBox == false
? Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(child: getButton(3)),
child: InkWell( Expanded(child: getButton(2))
onTap: () => { ],
authenticateUser( )
3, : SizedBox(),
BiometricType Row(
.face.index) mainAxisAlignment: MainAxisAlignment.center,
},
child: getButton(
user.logInType))),
Expanded(child: getButton(5))
])
]))
: Expanded(
flex: 4,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
onlySMSBox == false Expanded(child: getButton(1)),
? Row( Expanded(child: getButton(4))
mainAxisAlignment: ],
MainAxisAlignment.center, ),
children: <Widget>[ ]),
Expanded(child: getButton(3)), ),
Expanded(child: getButton(2)) Expanded(
], flex: 1,
) child: Column(
: SizedBox(), mainAxisAlignment: MainAxisAlignment.end,
Row( children: <Widget>[
mainAxisAlignment: user != null
MainAxisAlignment.center, ? Row(
children: <Widget>[ children: <Widget>[
Expanded(child: getButton(1)), Expanded(
Expanded(child: getButton(4)) child: DefaultButton(
], TranslationBase.of(context)
), .useAnotherAccount,
]), () => {
), Navigator.of(context).pushNamed(
Expanded( LOGIN_TYPE,
flex: 1, )
child: Column( },
mainAxisAlignment: MainAxisAlignment.end, )),
children: <Widget>[ ],
user != null )
? Row( : SizedBox(),
children: <Widget>[ ],
Expanded( ))
child: DefaultButton( ],
TranslationBase.of(context) ))));
.useAnotherAccount,
() => {
Navigator.of(context).pushNamed(
LOGIN_TYPE,
)
},
)),
],
)
: SizedBox(),
],
))
],
)))
: AppCircularProgressIndicator());
} }
Future<void> _getAvailableBiometrics() async { Future<void> _getAvailableBiometrics() async {
@ -315,32 +303,40 @@ class _ConfirmLogin extends State<ConfirmLogin> {
var request = CheckPatientAuthenticationReq.fromJson(req.toJson()); var request = CheckPatientAuthenticationReq.fromJson(req.toJson());
sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request); sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request);
authService.checkPatientAuthentication(request).then((value) => { authService
if (value['isSMSSent']) .checkPatientAuthentication(request)
{ .then((value) => {
sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']), if (value['isSMSSent'])
this.loginTokenID = value['LogInTokenID'], {
sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, request), sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']),
// Future.delayed(Duration(seconds: 1), () { this.loginTokenID = value['LogInTokenID'],
this.sendActivationCode(type) sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, request),
// }) // Future.delayed(Duration(seconds: 1), () {
} this.sendActivationCode(type)
else // })
{ }
if (value['IsAuthenticated']) {this.checkActivationCode()} else
} {
}); if (value['IsAuthenticated']) {this.checkActivationCode()}
}
})
.catchError((err) {
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
sendActivationCode(type) { sendActivationCode(type) async {
var request = this.getCommonRequest(); var request = this.getCommonRequest();
loading(true); // loading(true);
this.authService.sendActivationCode(request).then((result) => {
if (result != null && result['isSMSSent'] == true) await this.authService.sendActivationCode(request).then((result) => {
{loading(false), this.startSMSService(type)} if (result != null && result['isSMSSent'] == true)
else {this.startSMSService(type)}
{loading(false)} });
});
// SMSOTP.showLoadingDialog(context, false),
} }
startSMSService(type) { startSMSService(type) {
@ -371,42 +367,50 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
getMobileInfo(request) { getMobileInfo(request) {
this.authService.getLoginInfo(request).then((result) => { this
if (result['SMSLoginRequired'] == false) .authService
{ .getLoginInfo(request)
this.loginTokenID = result.logInTokenID, .then((result) => {
this.patientOutSA = result.patientOutSA, if (result['SMSLoginRequired'] == false)
// sms for register the biometric
if (result.isSMSSent)
{ {
this.onlySMSBox = false, this.loginTokenID = result.logInTokenID,
//this.button(); this.patientOutSA = result.patientOutSA,
// sms for register the biometric
if (result.isSMSSent)
{
this.onlySMSBox = false,
//this.button();
}
else
{checkActivationCode()}
} }
else else
{checkActivationCode()}
}
else
{
if (result['IsAuthenticated'] == true)
{ {
setState(() { if (result['IsAuthenticated'] == true)
isMoreOption = true; {
this.onlySMSBox = true; setState(() {
// this.fingrePrintBefore = true; isMoreOption = true;
}), this.onlySMSBox = true;
// this.fingrePrintBefore = true;
//sharedPref.setBool(ONLY_SMS, true), }),
// this.cs.sharedService.setSharedData(true, AuthenticationService.ONLY_SMS);
//this.cs.sharedService.setSharedData(this.selectedOption, AuthenticationService.FINGUREPRINT_BEFORE); //sharedPref.setBool(ONLY_SMS, true),
// this.cs.confirmLogin(); // this.cs.sharedService.setSharedData(true, AuthenticationService.ONLY_SMS);
//this.button(); //this.cs.sharedService.setSharedData(this.selectedOption, AuthenticationService.FINGUREPRINT_BEFORE);
// this.cs.confirmLogin();
//this.button();
}
// else
// {
// // this.cs.presentAlert(result.ErrorEndUserMessage);
// }
} }
// else })
// { .catchError((err) {
// // this.cs.presentAlert(result.ErrorEndUserMessage); print(err);
// } }).showProgressBar(
} text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}); ;
} }
setUser() async {} setUser() async {}
@ -427,9 +431,13 @@ class _ConfirmLogin extends State<ConfirmLogin> {
: int.parse(this.user.mobile); : int.parse(this.user.mobile);
this.zipCode = this.registerd_data != null this.zipCode = this.registerd_data != null
? this.registerd_data.zipCode ? this.registerd_data.zipCode
: this.user.outSA == true ? "971" : "966"; : this.user.outSA == true
? "971"
: "966";
this.patientOutSA = this.registerd_data != null this.patientOutSA = this.registerd_data != null
? this.registerd_data.zipCode == "966" ? 0 : 1 ? this.registerd_data.zipCode == "966"
? 0
: 1
: this.user.outSA; : this.user.outSA;
if (this.registerd_data != null) { if (this.registerd_data != null) {
this.loginTokenID = await sharedPref.getString(LOGIN_TOKEN_ID); this.loginTokenID = await sharedPref.getString(LOGIN_TOKEN_ID);
@ -477,43 +485,51 @@ class _ConfirmLogin extends State<ConfirmLogin> {
SMSOTP.showLoadingDialog(context, true); SMSOTP.showLoadingDialog(context, true);
var request = this.getCommonRequest().toJson(); var request = this.getCommonRequest().toJson();
this.authService.checkActivationCode(request, value).then((result) => { this
if (result is Map) .authService
{ .checkActivationCode(request, value)
result = CheckActivationCode.fromJson(result), .then((result) => {
if (this.registerd_data != null && if (result is Map)
this.registerd_data.isRegister == true)
{ {
Navigator.of(context).pushNamed( result = CheckActivationCode.fromJson(result),
REGISTER_INFO, if (this.registerd_data != null &&
) this.registerd_data.isRegister == true)
{
Navigator.of(context).pushNamed(
REGISTER_INFO,
)
}
else
{
this.userData = result
.list, //AuthenticatedUser.fromJson(result['List'][0]),
this.sharedPref.setObject(USER_PROFILE, result.list),
this.loginTokenID = result.logInTokenID,
this
.sharedPref
.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
this
.sharedPref
.setString(TOKEN, result.authenticationTokenID),
this.checkIfUserAgreedBefore(result),
// Navigator.of(context).pop(),
SMSOTP.showLoadingDialog(context, false),
}
} }
else else
{ {
this.userData = result
.list, //AuthenticatedUser.fromJson(result['List'][0]),
this.sharedPref.setObject(USER_PROFILE, result.list),
this.loginTokenID = result.logInTokenID,
this
.sharedPref
.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
this
.sharedPref
.setString(TOKEN, result.authenticationTokenID),
this.checkIfUserAgreedBefore(result),
// Navigator.of(context).pop(), // Navigator.of(context).pop(),
SMSOTP.showLoadingDialog(context, false), SMSOTP.showLoadingDialog(context, false),
Future.delayed(Duration(seconds: 1), () {
AppToast.showErrorToast(message: result);
}),
} }
} })
else .catchError((err) {
{ print(err);
// Navigator.of(context).pop(), }).showProgressBar(
SMSOTP.showLoadingDialog(context, false), text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
Future.delayed(Duration(seconds: 1), () { ;
AppToast.showErrorToast(message: result);
}),
}
});
} }
checkIfUserAgreedBefore(CheckActivationCode result) { checkIfUserAgreedBefore(CheckActivationCode result) {
@ -526,42 +542,17 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
insertIMEI() { insertIMEI() {
authService.insertDeviceImei(selectedOption).then((value) => {goToHome()}); authService
.insertDeviceImei(selectedOption)
.then((value) => {goToHome()})
.catchError((err) {
print(err);
});
} }
goToHome() { goToHome() {
// authService.insertDeviceImei().then((value) => print(value)); // authService.insertDeviceImei().then((value) => print(value));
Navigator.of(context).pushNamed(HOME); Navigator.of(context).pushNamed(HOME);
// const request = new LoginRequest();
// if (this.loginType === AuthenticationService.IDENTIFCIATION_LOGIN_TYPE) {
// request.PatientID = 0;
// } else {
// request.PatientID = Number(this.id);
// }
// this.newRating(request);
// }
// public newRating(request: any) {
// this.authService
// .checkIfRated(
// request,
// () => {
// this.gotoHome();
// },
// this.ts.trPK("general", "retry")
// )
// .subscribe((result: CheckUserRatingResponse) => {
// if (this.cs.validResponse(result)) {
// this.cs.sharedService.setSharedData(result, AuthenticationService.SURVEY_DATA);
// if (result.IsLastAppoitmentRatedList.length === 0) {
// this.cs.openHome();
// } else {
// this.ProjectID = result.IsLastAppoitmentRatedList[0].ProjectID;
// this.AppointmentNo = result.IsLastAppoitmentRatedList[0].AppointmentNo;
// this.cs.sharedService.setSharedData(true, "ratePage");
// this.showRateModal();
// }
// }
// });
} }
loading(flag) { loading(flag) {

@ -24,7 +24,7 @@ class LoginType extends StatelessWidget {
Expanded( Expanded(
flex: 4, flex: 4,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
@ -136,7 +136,7 @@ class LoginType extends StatelessWidget {
]), ]),
), ),
Expanded( Expanded(
flex: 2, flex: 1,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[

@ -22,7 +22,7 @@ import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class Login extends StatefulWidget { class Login extends StatefulWidget {
@override @override
_Login createState() => _Login(); _Login createState() => _Login();
@ -62,9 +62,7 @@ class _Login extends State<Login> {
appBarTitle: TranslationBase.of(context).login, appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
body: isLoading == true body: SingleChildScrollView(
? AppCircularProgressIndicator()
: SingleChildScrollView(
child: Container( child: Container(
padding: padding:
EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30), EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
@ -89,6 +87,7 @@ class _Login extends State<Login> {
onCountryChange: (value) => countryCode = value), onCountryChange: (value) => countryCode = value),
Container( Container(
child: TextFields( child: TextFields(
fontWeight: FontWeight.normal,
controller: nationalIDorFile, controller: nationalIDorFile,
onChanged: (value) => {validateForm()}, onChanged: (value) => {validateForm()},
prefixIcon: Icon( prefixIcon: Icon(
@ -151,7 +150,7 @@ class _Login extends State<Login> {
} }
checkUserAuthentication() { checkUserAuthentication() {
showLoader(true); // showLoader(true);
var request = CheckPatientAuthenticationReq(); var request = CheckPatientAuthenticationReq();
request.isRegister = false; request.isRegister = false;
request.patientMobileNumber = int.parse(mobileNo); request.patientMobileNumber = int.parse(mobileNo);
@ -167,7 +166,7 @@ class _Login extends State<Login> {
} }
sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request); sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request);
authService.checkPatientAuthentication(request).then((value) => { authService.checkPatientAuthentication(request).then((value) => {
showLoader(false), //showLoader(false),
if (value['isSMSSent']) if (value['isSMSSent'])
{ {
sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']), sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']),
@ -178,7 +177,11 @@ class _Login extends State<Login> {
{ {
if (value['IsAuthenticated']) {this.checkActivationCode()} if (value['IsAuthenticated']) {this.checkActivationCode()}
} }
}); }).catchError((err) {
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
// SMSOTP.showLoadingDialog(context, false),
} }
checkActivationCode({code}) async { checkActivationCode({code}) async {
@ -186,6 +189,8 @@ class _Login extends State<Login> {
// request.logInTokenID = await sharedPref.getString(LOGIN_TOKEN_ID); // request.logInTokenID = await sharedPref.getString(LOGIN_TOKEN_ID);
// request.activationCode = code ?? "0000"; // request.activationCode = code ?? "0000";
// request.isSilentLogin = code != null ? false : true; // request.isSilentLogin = code != null ? false : true;
if (code == null)
//showLoader(true);
request['PatientMobileNumber'] = int.parse(mobileNo); request['PatientMobileNumber'] = int.parse(mobileNo);
request['ZipCode'] = countryCode; request['ZipCode'] = countryCode;
request['SearchType'] = loginType; request['SearchType'] = loginType;
@ -208,6 +213,7 @@ class _Login extends State<Login> {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
HOME, HOME,
), ),
//showLoader(false),
appointmentRateViewModel appointmentRateViewModel
.getIsLastAppointmentRatedList() .getIsLastAppointmentRatedList()
.then((value) => { .then((value) => {
@ -229,14 +235,17 @@ class _Login extends State<Login> {
), ),
) )
} }
}) }).catchError((err) {
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
// SMSOTP.showLoadingDialog(context, false), // SMSOTP.showLoadingDialog(context, false),
}); });
} }
showLoader(bool isTrue) { // showLoader(bool isTrue) {
setState(() { // setState(() {
isLoading = isTrue; // isLoading = isTrue;
}); // });
} // }
} }

@ -61,7 +61,7 @@ class _WelcomeLogin extends State<WelcomeLogin> {
textAlign: TextAlign.left, textAlign: TextAlign.left,
), ),
SizedBox( SizedBox(
height: SizeConfig.realScreenHeight * .2, height: SizeConfig.realScreenHeight * .15,
) )
]), ]),
), ),

@ -30,7 +30,7 @@ class DoctorResponse extends StatelessWidget {
height: 65, height: 65,
), ),
AppExpandableNotifier( AppExpandableNotifier(
header: Padding( headerWidget: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -110,7 +110,7 @@ class DoctorResponse extends StatelessWidget {
), ),
), ),
AppExpandableNotifier( AppExpandableNotifier(
header: Padding( headerWidget: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,

@ -38,7 +38,7 @@ class MyBalancePage extends StatelessWidget {
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#B61422'), color: HexColor('#B61422'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(7),
), ),
@ -96,8 +96,7 @@ class MyBalancePage extends StatelessWidget {
textColor: Colors.white, textColor: Colors.white,
label: TranslationBase.of(context).createAdvancedPayment, label: TranslationBase.of(context).createAdvancedPayment,
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(context, FadePage(page: AdvancePaymentPage()));
FadePage(page: AdvancePaymentPage()));
}, },
), ),
), ),

@ -135,7 +135,7 @@ class _WeightHomePageState extends State<WeightHomePage>
width: 55, width: 55,
height: 55, height: 55,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, color: Hexcolor('515B5D')), shape: BoxShape.circle, color: HexColor('515B5D')),
child: Center( child: Center(
child: Icon( child: Icon(
Icons.add, Icons.add,

@ -15,8 +15,7 @@ class WeightMonthlyPage extends StatelessWidget {
final List<charts.Series<YearMonthlyChartDate, int>> data; final List<charts.Series<YearMonthlyChartDate, int>> data;
final List<WeightMeasurementResult> diabtecPatientResult; final List<WeightMeasurementResult> diabtecPatientResult;
const WeightMonthlyPage( const WeightMonthlyPage({Key key, this.data, this.diabtecPatientResult})
{Key key, this.data, this.diabtecPatientResult})
: super(key: key); : super(key: key);
@override @override
@ -67,7 +66,7 @@ class WeightMonthlyPage extends StatelessWidget {
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -83,18 +82,26 @@ class WeightMonthlyPage extends StatelessWidget {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Time', color: Colors.white,fontSize: 15,), child: Texts(
'Time',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white,fontSize: 15,), child: Texts(
'Value',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
], ],

@ -29,8 +29,9 @@ class WeightWeeklyPage extends StatelessWidget {
dateTimeFactory: const charts.LocalDateTimeFactory(), dateTimeFactory: const charts.LocalDateTimeFactory(),
), ),
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts('Details'), child: Texts('Details'),
@ -62,7 +63,7 @@ class WeightWeeklyPage extends StatelessWidget {
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -78,37 +79,50 @@ class WeightWeeklyPage extends StatelessWidget {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Time', color: Colors.white,fontSize: 15,), child: Texts(
'Time',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white,fontSize: 15,), child: Texts(
'Value',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(
child: Texts('Edit', color: Colors.white,fontSize: 15,), child: Texts(
'Edit',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
], ],
), ),
); );
diabtecPatientResult.forEach((diabtec) { diabtecPatientResult.forEach(
(diabtec) {
tableRow.add( tableRow.add(
TableRow( TableRow(
children: [ children: [

@ -65,7 +65,7 @@ class WeightYearPage extends StatelessWidget {
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -81,25 +81,33 @@ class WeightYearPage extends StatelessWidget {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Time', color: Colors.white,fontSize: 15,), child: Texts(
'Time',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white,fontSize: 15,), child: Texts(
'Value',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
], ],
), ),
); );
diabtecPatientResult.forEach( diabtecPatientResult.forEach(
(diabtec) { (diabtec) {
tableRow.add( tableRow.add(
TableRow( TableRow(
children: [ children: [

@ -138,7 +138,7 @@ class _BloodPressureHomePageState extends State<BloodPressureHomePage>
width: 55, width: 55,
height: 55, height: 55,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, color: Hexcolor('515B5D')), shape: BoxShape.circle, color: HexColor('515B5D')),
child: Center( child: Center(
child: Icon( child: Icon(
Icons.add, Icons.add,

@ -67,7 +67,7 @@ class BloodPressureMonthlyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -85,7 +85,7 @@ class BloodPressureMonthlyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
@ -99,7 +99,7 @@ class BloodPressureMonthlyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
@ -113,7 +113,7 @@ class BloodPressureMonthlyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),
@ -149,7 +149,8 @@ class BloodPressureMonthlyPage extends StatelessWidget {
), ),
), ),
), ),
Container(child: Container( Container(
child: Container(
height: 70, height: 70,
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
color: Colors.white, color: Colors.white,
@ -160,7 +161,8 @@ class BloodPressureMonthlyPage extends StatelessWidget {
fontSize: 12, fontSize: 12,
), ),
), ),
),), ),
),
Container( Container(
child: Container( child: Container(
height: 70, height: 70,

@ -65,7 +65,7 @@ class BloodPressureYearPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -83,7 +83,7 @@ class BloodPressureYearPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
@ -97,7 +97,7 @@ class BloodPressureYearPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
@ -108,11 +108,10 @@ class BloodPressureYearPage extends StatelessWidget {
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),

@ -30,8 +30,9 @@ class BloodPressureWeeklyPage extends StatelessWidget {
dateTimeFactory: const charts.LocalDateTimeFactory(), dateTimeFactory: const charts.LocalDateTimeFactory(),
), ),
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts('Details'), child: Texts('Details'),
@ -64,7 +65,7 @@ class BloodPressureWeeklyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -82,50 +83,67 @@ class BloodPressureWeeklyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Time', color: Colors.white,fontSize: 15,), child: Texts(
'Time',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Measured', color: Colors.white,fontSize: 15,), child: Texts(
'Measured',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white,fontSize: 15,), child: Texts(
'Value',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(
child: Texts('Edit', color: Colors.white,fontSize: 15,), child: Texts(
'Edit',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
], ],
), ),
); );
diabtecPatientResult.forEach((diabtec) { diabtecPatientResult.forEach(
(diabtec) {
tableRow.add( tableRow.add(
TableRow( TableRow(
children: [ children: [

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/YearMonthlyChartDate.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/YearMonthlyChartDate.dart';
@ -14,7 +13,8 @@ class BloodMonthlyPage extends StatelessWidget {
final List<charts.Series<YearMonthlyChartDate, int>> data; final List<charts.Series<YearMonthlyChartDate, int>> data;
final List<DiabtecPatientResult> diabtecPatientResult; final List<DiabtecPatientResult> diabtecPatientResult;
const BloodMonthlyPage({Key key, this.data,this.diabtecPatientResult}) : super(key: key); const BloodMonthlyPage({Key key, this.data, this.diabtecPatientResult})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
@ -24,14 +24,14 @@ class BloodMonthlyPage extends StatelessWidget {
width: double.maxFinite, width: double.maxFinite,
height: 180, height: 180,
color: Colors.white, color: Colors.white,
child: charts.LineChart( child: charts.LineChart(data,
data,
//animate: animate, //animate: animate,
defaultRenderer: new charts.LineRendererConfig(includePoints: true) defaultRenderer:
), new charts.LineRendererConfig(includePoints: true)),
),
SizedBox(
height: 12,
), ),
SizedBox(height: 12,),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts('Details'), child: Texts('Details'),
@ -51,7 +51,6 @@ class BloodMonthlyPage extends StatelessWidget {
], ],
), ),
) )
], ],
), ),
); );
@ -65,7 +64,7 @@ class BloodMonthlyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -83,105 +82,116 @@ class BloodMonthlyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Time', color: Colors.white,fontSize: 15,), child: Texts(
'Time',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Measured', color: Colors.white,fontSize: 15,), child: Texts(
'Measured',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white,fontSize: 15,), child: Texts(
'Value',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
], ],
), ),
); );
diabtecPatientResult.forEach((diabtec) { diabtecPatientResult.forEach(
tableRow.add( (diabtec) {
TableRow( tableRow.add(
children: [ TableRow(
Container( children: [
child: Container( Container(
height: 70, child: Container(
padding: EdgeInsets.all(10), height: 70,
color: Colors.white, padding: EdgeInsets.all(10),
child: Center( color: Colors.white,
child: Texts( child: Center(
'${DateUtil.getMonthDayYearDateFormatted(diabtec.dateChart)} ', child: Texts(
textAlign: TextAlign.center, '${DateUtil.getMonthDayYearDateFormatted(diabtec.dateChart)} ',
fontSize: 12, textAlign: TextAlign.center,
fontSize: 12,
),
), ),
), ),
), ),
), Container(
Container( child: Container(
child: Container( height: 70,
height: 70, padding: EdgeInsets.all(10),
padding: EdgeInsets.all(10), color: Colors.white,
color: Colors.white, child: Center(
child: Center( child: Texts(
child: Texts( '${diabtec.dateChart.hour}:${diabtec.dateChart.minute}',
'${diabtec.dateChart.hour}:${diabtec.dateChart.minute}', textAlign: TextAlign.center,
textAlign: TextAlign.center, fontSize: 12,
fontSize: 12, ),
), ),
), ),
), ),
), Container(
Container( child: Container(
child: Container( height: 70,
height: 70, padding: EdgeInsets.all(10),
padding: EdgeInsets.all(10), color: Colors.white,
color: Colors.white, child: Center(
child: Center( child: Texts(
child: Texts( '${diabtec.measuredDesc}',
'${diabtec.measuredDesc}', textAlign: TextAlign.center,
textAlign: TextAlign.center, fontSize: 12,
fontSize: 12, ),
), ),
), ),
), ),
), Container(
Container( child: Container(
child: Container( height: 70,
height: 70, padding: EdgeInsets.all(10),
padding: EdgeInsets.all(10), color: Colors.white,
color: Colors.white, child: Center(
child: Center( child: Texts(
child: Texts( '${diabtec.resultValue}',
'${diabtec.resultValue}', textAlign: TextAlign.center,
textAlign: TextAlign.center, fontSize: 12,
fontSize: 12, ),
), ),
), ),
), ),
), ],
),
], );
), },
);
},
); );
return tableRow; return tableRow;
} }

@ -64,7 +64,7 @@ class BloodYearPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -82,7 +82,7 @@ class BloodYearPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
@ -96,7 +96,7 @@ class BloodYearPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
@ -107,11 +107,10 @@ class BloodYearPage extends StatelessWidget {
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),

@ -37,7 +37,6 @@ class _BloodSugarHomePageState extends State<BloodSugarHomePage>
_tabController.dispose(); _tabController.dispose();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<BloodSugarViewMode>( return BaseView<BloodSugarViewMode>(
@ -78,7 +77,8 @@ class _BloodSugarHomePageState extends State<BloodSugarHomePage>
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Colors.red[800], indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0), labelPadding:
EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Container(
@ -114,27 +114,37 @@ class _BloodSugarHomePageState extends State<BloodSugarHomePage>
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
BloodSugarWeeklyPage(data: model.getBloodWeeklySeries(),diabtecPatientResult: model.weekDiabtecPatientResult,), BloodSugarWeeklyPage(
BloodMonthlyPage(data: model.getBloodMonthlyTimeSeriesSales(),diabtecPatientResult: model.monthDiabtecPatientResult,), data: model.getBloodWeeklySeries(),
BloodYearPage(data: model.getBloodYearTimeSeriesSales(),diabtecPatientResult: model.yearDiabtecPatientResult,) diabtecPatientResult: model.weekDiabtecPatientResult,
),
BloodMonthlyPage(
data: model.getBloodMonthlyTimeSeriesSales(),
diabtecPatientResult: model.monthDiabtecPatientResult,
),
BloodYearPage(
data: model.getBloodYearTimeSeriesSales(),
diabtecPatientResult: model.yearDiabtecPatientResult,
)
], ],
), ),
) )
], ],
), ),
floatingActionButton: InkWell( floatingActionButton: InkWell(
onTap: (){ onTap: () {
Navigator.push(context, FadePage(page: AddBloodSugarPage())); Navigator.push(context, FadePage(page: AddBloodSugarPage()));
}, },
child: Container( child: Container(
width: 55, width: 55,
height: 55, height: 55,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle, color: HexColor('515B5D')),
color: Hexcolor('515B5D')
),
child: Center( child: Center(
child: Icon(Icons.add,color: Colors.white,), child: Icon(
Icons.add,
color: Colors.white,
),
), ),
), ),
), ),

@ -29,8 +29,9 @@ class BloodSugarWeeklyPage extends StatelessWidget {
dateTimeFactory: const charts.LocalDateTimeFactory(), dateTimeFactory: const charts.LocalDateTimeFactory(),
), ),
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts('Details'), child: Texts('Details'),
@ -63,7 +64,7 @@ class BloodSugarWeeklyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -81,50 +82,67 @@ class BloodSugarWeeklyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Time', color: Colors.white,fontSize: 15,), child: Texts(
'Time',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Measured', color: Colors.white,fontSize: 15,), child: Texts(
'Measured',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white,fontSize: 15,), child: Texts(
'Value',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(
child: Texts('Edit', color: Colors.white,fontSize: 15,), child: Texts(
'Edit',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
], ],
), ),
); );
diabtecPatientResult.forEach((diabtec) { diabtecPatientResult.forEach(
(diabtec) {
tableRow.add( tableRow.add(
TableRow( TableRow(
children: [ children: [

@ -52,7 +52,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -69,7 +69,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),

@ -45,16 +45,22 @@ class VitalSignItem extends StatelessWidget {
child: Text( child: Text(
des, des,
style: TextStyle( style: TextStyle(
fontSize: 1.7 * SizeConfig.textMultiplier, fontSize: 1.7 * SizeConfig.textMultiplier,
color: Hexcolor('#B8382C'), color: HexColor('#B8382C'),
fontWeight: FontWeight.bold,), fontWeight: FontWeight.bold,
),
), ),
), ),
), ),
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: Container(child: Icon(icon,size: 40,),), child: Container(
child: Icon(
icon,
size: 40,
),
),
) )
], ],
), ),
@ -65,7 +71,7 @@ class VitalSignItem extends StatelessWidget {
child: Align( child: Align(
alignment: Alignment.topRight, alignment: Alignment.topRight,
child: Container( child: Container(
margin: EdgeInsets.only(left: 5,right: 5), margin: EdgeInsets.only(left: 5, right: 5),
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
style: TextStyle(color: Colors.black), style: TextStyle(color: Colors.black),
@ -74,7 +80,7 @@ class VitalSignItem extends StatelessWidget {
TextSpan( TextSpan(
text: unit, text: unit,
style: TextStyle( style: TextStyle(
color: Hexcolor('#B8382C'), color: HexColor('#B8382C'),
), ),
), ),
]), ]),

@ -41,7 +41,7 @@ class PaymentService extends StatelessWidget {
children: [ children: [
Texts( Texts(
TranslationBase.of(context).payment, TranslationBase.of(context).payment,
color: Hexcolor('#B61422'), color: HexColor('#B61422'),
bold: true, bold: true,
), ),
Texts( Texts(
@ -73,11 +73,11 @@ class PaymentService extends StatelessWidget {
children: [ children: [
Texts( Texts(
TranslationBase.of(context).onlineCheckIn, TranslationBase.of(context).onlineCheckIn,
color: Hexcolor('#B61422'), color: HexColor('#B61422'),
bold: true, bold: true,
), ),
Texts( Texts(
TranslationBase.of(context).appointment, TranslationBase.of(context).appointment,
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
@ -115,7 +115,7 @@ class PaymentService extends StatelessWidget {
children: [ children: [
Texts( Texts(
'My Balances', 'My Balances',
color: Hexcolor('#B61422'), color: HexColor('#B61422'),
bold: true, bold: true,
), ),
Texts( Texts(

@ -226,7 +226,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
child: Texts( child: Texts(
'Later', 'Later',
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
color: Hexcolor('#151DFE'), color: HexColor('#151DFE'),
fontSize: 18, fontSize: 18,
), ),
) )

@ -177,7 +177,9 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
}, },
), ),
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
Container( Container(
width: double.infinity, width: double.infinity,
child: Column( child: Column(
@ -222,7 +224,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: Texts( child: Texts(
'Later', 'Later',
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
color: Hexcolor('#151DFE'), color: HexColor('#151DFE'),
fontSize: 18, fontSize: 18,
), ),
) )

File diff suppressed because one or more lines are too long

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/pages/login/login.dart';
import 'package:diplomaticquarterapp/pages/login/register.dart'; import 'package:diplomaticquarterapp/pages/login/register.dart';
import 'package:diplomaticquarterapp/pages/family/add-family_type.dart'; import 'package:diplomaticquarterapp/pages/family/add-family_type.dart';
import 'package:diplomaticquarterapp/pages/family/add-family-member.dart'; import 'package:diplomaticquarterapp/pages/family/add-family-member.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/symtom-checker.dart';
const String INIT_ROUTE = '/'; const String INIT_ROUTE = '/';
const String HOME = '/'; const String HOME = '/';
@ -25,6 +26,7 @@ const String MY_FAMILIY = 'my-family';
const String ADD_FAMILY_MEMBER_TYPE = 'add-family-member-type'; const String ADD_FAMILY_MEMBER_TYPE = 'add-family-member-type';
const String ADD_FAMILY_MEMBER = 'add-family-member'; const String ADD_FAMILY_MEMBER = 'add-family-member';
const String LIVE_CARE = 'live-care'; const String LIVE_CARE = 'live-care';
const String SYMPTOM_CHECKER = 'symptom-checker';
var routes = { var routes = {
HOME: (_) => LandingPage(), HOME: (_) => LandingPage(),
WELCOME_LOGIN: (_) => WelcomeLogin(), WELCOME_LOGIN: (_) => WelcomeLogin(),
@ -37,5 +39,6 @@ var routes = {
MY_FAMILIY: (_) => MyFamily(), MY_FAMILIY: (_) => MyFamily(),
ADD_FAMILY_MEMBER_TYPE: (_) => AddFamilyMemberType(), ADD_FAMILY_MEMBER_TYPE: (_) => AddFamilyMemberType(),
ADD_FAMILY_MEMBER: (_) => AddMember(), ADD_FAMILY_MEMBER: (_) => AddMember(),
LIVE_CARE: (_) => LiveCareHome() LIVE_CARE: (_) => LiveCareHome(),
SYMPTOM_CHECKER: (_) => SymptomChecker()
}; };

@ -27,7 +27,7 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorsList( Future<Map> getDoctorsList(
int clinicID, int projectID, bool isNearest, BuildContext context, int clinicID, int projectID, bool isNearest, BuildContext context,
{doctorId}) async { {doctorId, doctorName}) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -56,15 +56,20 @@ class DoctorsListService extends BaseService {
"SessionID": "YckwoXhUmWBsnHKEKig", "SessionID": "YckwoXhUmWBsnHKEKig",
"ClinicID": clinicID, "ClinicID": clinicID,
"ProjectID": projectID, "ProjectID": projectID,
"DoctorName": doctorId, //!= null ? doctorId : 0, "DoctorName": doctorName, //!= null ? doctorId : 0,
"ContinueDentalPlan": false, "ContinueDentalPlan": false,
"IsSearchAppointmnetByClinicID": true, "IsSearchAppointmnetByClinicID": true,
"PatientID": authUser.patientID != null ? authUser.patientID : 0, "PatientID": authUser.patientID != null ? authUser.patientID : 0,
"gender": authUser.gender != null ? authUser.gender : 0, "gender": authUser.gender != null ? authUser.gender : 0,
"age": authUser.age != null ? authUser.age : 0, "age": authUser.age != null ? authUser.age : 0,
"IsGetNearAppointment": false, "IsGetNearAppointment": false,
"Latitude": lat.toString(), // "Latitude": 0,
"Longitude": long.toString(), // "Longitude": 0,
// "License": true,
"IsVoiceCommand": doctorId != null && doctorId.length > 0 ? true : false,
"DoctorIDsList": doctorId,
"Latitude": lat != null ? lat.toString() : 0,
"Longitude": long != null ? long.toString() : 0,
"IsGetNearAppointment": isNearest, "IsGetNearAppointment": isNearest,
if (isNearest) if (isNearest)
"SelectedDate": DateUtil.convertDateToString(DateTime.now()), "SelectedDate": DateUtil.convertDateToString(DateTime.now()),

@ -161,19 +161,15 @@ class AuthProvider with ChangeNotifier {
request.generalid = GENERAL_ID; request.generalid = GENERAL_ID;
request.languageID = LANGUAGE_ID; request.languageID = LANGUAGE_ID;
request.patientOutSA = request.zipCode == '966' ? 0 : 1; request.patientOutSA = request.zipCode == '966' ? 0 : 1;
try {
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(CHECK_PATIENT_AUTH, await new BaseAppClient().post(CHECK_PATIENT_AUTH,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error;
}, body: request.toJson());
return Future.value(localRes);
} catch (error) {
print(error);
throw error; throw error;
} }, body: request.toJson());
return Future.value(localRes);
} }
Future<dynamic> getLoginInfo(request) async { Future<dynamic> getLoginInfo(request) async {
@ -185,19 +181,15 @@ class AuthProvider with ChangeNotifier {
request.deviceTypeID = DeviceTypeID; request.deviceTypeID = DeviceTypeID;
request.patientOutSA = request.zipCode == '966' ? 0 : 1; request.patientOutSA = request.zipCode == '966' ? 0 : 1;
request.isDentalAllowedBackend = false; request.isDentalAllowedBackend = false;
try {
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(GET_MOBILE_INFO, await new BaseAppClient().post(GET_MOBILE_INFO,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error;
}, body: request.toJson());
return Future.value(localRes);
} catch (error) {
print(error);
throw error; throw error;
} }, body: request.toJson());
return Future.value(localRes);
} }
Future<dynamic> sendActivationCode(request) async { Future<dynamic> sendActivationCode(request) async {
@ -209,20 +201,16 @@ class AuthProvider with ChangeNotifier {
request.deviceTypeID = DeviceTypeID; request.deviceTypeID = DeviceTypeID;
request.patientOutSA = request.zipCode == '966' ? 0 : 1; request.patientOutSA = request.zipCode == '966' ? 0 : 1;
request.isDentalAllowedBackend = false; request.isDentalAllowedBackend = false;
try {
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(SEND_ACTIVATION_CODE, await new BaseAppClient().post(SEND_ACTIVATION_CODE,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
authenticatedUser = CheckActivationCode.fromJson(localRes); authenticatedUser = CheckActivationCode.fromJson(localRes);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error;
}, body: request.toJson());
return Future.value(localRes);
} catch (error) {
print(error);
throw error; throw error;
} }, body: request.toJson());
return Future.value(localRes);
} }
Future<dynamic> checkActivationCode(request, [value]) async { Future<dynamic> checkActivationCode(request, [value]) async {

@ -33,6 +33,10 @@ const String REMOVE_FILE_STATUS =
const String ACTIVATION_CODE_URL = const String ACTIVATION_CODE_URL =
"Services/Authentication.svc/REST/CheckActivationCode"; "Services/Authentication.svc/REST/CheckActivationCode";
const String SENT_REQUEST_URL =
'Services/Authentication.svc/REST/GetAllSharedRecordsByStatus';
const String RECEVIED_REQUEST_URL =
'Services/Authentication.svc/REST/GetAllPendingRecordsByResponseId';
class FamilyFilesProvider with ChangeNotifier { class FamilyFilesProvider with ChangeNotifier {
bool isLogin = false; bool isLogin = false;
@ -60,6 +64,48 @@ class FamilyFilesProvider with ChangeNotifier {
} }
} }
Future getUserViewRequest(responseID) async {
try {
dynamic localRes;
Map<String, dynamic> request = {};
request['ResponseID'] = responseID;
await new BaseAppClient().post(RECEVIED_REQUEST_URL,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
return Future.value(error);
}, body: request);
sharedPref.setObject(FAMILY_FILE, localRes);
return Future.value(
GetAllSharedRecordsByStatusResponse.fromJson(localRes));
} catch (error) {
print(error);
throw error;
}
}
Future<GetAllSharedRecordsByStatusResponse> getUserSentRequest() async {
try {
dynamic localRes;
Map<String, dynamic> request = {};
request['Status'] = 0;
await new BaseAppClient().post(SENT_REQUEST_URL,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
return Future.value(error);
//AppToast.showErrorToast(message: error);
//throw error;
}, body: request);
sharedPref.setObject(FAMILY_FILE, localRes);
return Future.value(
GetAllSharedRecordsByStatusResponse.fromJson(localRes));
} catch (error) {
print(error);
throw error;
}
}
Future<dynamic> addFamilyFile(AddFamilyFileReq request) async { Future<dynamic> addFamilyFile(AddFamilyFileReq request) async {
try { try {
dynamic localRes; dynamic localRes;

@ -10,9 +10,11 @@ class SearchProvider with ChangeNotifier {
bool isLogin = false; bool isLogin = false;
bool isLoading = true; bool isLoading = true;
dynamic pageData = {}; dynamic pageData = {};
static bool isNewSession = false;
static var sessionID = new DateTime.now().millisecondsSinceEpoch;
Future<dynamic> getBotPages(request) async { Future<dynamic> getBotPages(request) async {
try { try {
request['SessionID'] = '123';
await BaseAppClient().post(SEARCH_BOT, await BaseAppClient().post(SEARCH_BOT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
pageData = response; pageData = response;
@ -34,4 +36,12 @@ class SearchProvider with ChangeNotifier {
//projectProvider.setSearchValue(pageData); //projectProvider.setSearchValue(pageData);
notifyListeners(); notifyListeners();
} }
getSessionID() {
if (isNewSession == true) {
return new DateTime.now().millisecondsSinceEpoch;
} else {
return sessionID;
}
}
} }

@ -4,16 +4,14 @@ import 'dart:ui';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart';
final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
FlutterLocalNotificationsPlugin();
class LocalNotification { class LocalNotification {
static Future scheduleNotification( static Future scheduleNotification(
{@required DateTime scheduledNotificationDateTime, {@required DateTime scheduledNotificationDateTime,
@required String title, @required String title,
@required String description}) async { @required String description}) async {
///vibrationPattern ///vibrationPattern
var vibrationPattern = Int64List(4); var vibrationPattern = Int64List(4);
vibrationPattern[0] = 0; vibrationPattern[0] = 0;
@ -26,8 +24,10 @@ class LocalNotification {
'ActivePrescriptions', 'ActivePrescriptions',
'ActivePrescriptionsDescription', 'ActivePrescriptionsDescription',
// icon: 'secondary_icon', // icon: 'secondary_icon',
sound: RawResourceAndroidNotificationSound('slow_spring_board'),///change it to be as ionic sound: RawResourceAndroidNotificationSound('slow_spring_board'),
// largeIcon: DrawableResourceAndroidBitmap('sample_large_icon'),///change it to be as ionic
///change it to be as ionic
// largeIcon: DrawableResourceAndroidBitmap('sample_large_icon'),///change it to be as ionic
vibrationPattern: vibrationPattern, vibrationPattern: vibrationPattern,
enableLights: true, enableLights: true,
color: const Color.fromARGB(255, 255, 0, 0), color: const Color.fromARGB(255, 255, 0, 0),
@ -35,15 +35,13 @@ class LocalNotification {
ledOnMs: 1000, ledOnMs: 1000,
ledOffMs: 500); ledOffMs: 500);
var iOSPlatformChannelSpecifics = var iOSPlatformChannelSpecifics =
IOSNotificationDetails(sound: 'slow_spring_board.aiff');///change it to be as ionic IOSNotificationDetails(sound: 'slow_spring_board.aiff');
var platformChannelSpecifics = NotificationDetails(
androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics); ///change it to be as ionic
await flutterLocalNotificationsPlugin.schedule( // var platformChannelSpecifics = NotificationDetails(
0, // androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
title, // await flutterLocalNotificationsPlugin.schedule(0, title, description,
description, // scheduledNotificationDateTime, platformChannelSpecifics);
scheduledNotificationDateTime,
platformChannelSpecifics);
} }
///Repeat notification every day at approximately 10:00:00 am ///Repeat notification every day at approximately 10:00:00 am
@ -54,14 +52,14 @@ class LocalNotification {
'repeatDailyAtTime channel name', 'repeatDailyAtTime channel name',
'repeatDailyAtTime description'); 'repeatDailyAtTime description');
var iOSPlatformChannelSpecifics = IOSNotificationDetails(); var iOSPlatformChannelSpecifics = IOSNotificationDetails();
var platformChannelSpecifics = NotificationDetails( // var platformChannelSpecifics = NotificationDetails(
androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics); // androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.showDailyAtTime( // await flutterLocalNotificationsPlugin.showDailyAtTime(
0, // 0,
'show daily title', // 'show daily title',
'Daily notification shown at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}', // 'Daily notification shown at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}',
time, // time,
platformChannelSpecifics); // platformChannelSpecifics);
} }
///Repeat notification weekly on Monday at approximately 10:00:00 am ///Repeat notification weekly on Monday at approximately 10:00:00 am
@ -72,15 +70,15 @@ class LocalNotification {
'show weekly channel name', 'show weekly channel name',
'show weekly description'); 'show weekly description');
var iOSPlatformChannelSpecifics = IOSNotificationDetails(); var iOSPlatformChannelSpecifics = IOSNotificationDetails();
var platformChannelSpecifics = NotificationDetails( // var platformChannelSpecifics = NotificationDetails(
androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics); // androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.showWeeklyAtDayAndTime( // await flutterLocalNotificationsPlugin.showWeeklyAtDayAndTime(
0, // 0,
'show weekly title', // 'show weekly title',
'Weekly notification shown on Monday at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}', // 'Weekly notification shown on Monday at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}',
Day.Monday, // Day.Monday,
time, // time,
platformChannelSpecifics); // platformChannelSpecifics);
} }
static String _toTwoDigitString(int value) { static String _toTwoDigitString(int value) {

@ -424,148 +424,224 @@ class TranslationBase {
String get removeFamilyMember => String get removeFamilyMember =>
localizedValues['remove-family-member'][locale.languageCode]; localizedValues['remove-family-member'][locale.languageCode];
String get myMedicalFile =>localizedValues['MyMedicalFile'][locale.languageCode]; String get myMedicalFile =>
String get myMedicalFileSubTitle =>localizedValues['myMedicalFileSubTitle'][locale.languageCode]; localizedValues['MyMedicalFile'][locale.languageCode];
String get viewMore =>localizedValues['viewMore'][locale.languageCode]; String get myMedicalFileSubTitle =>
String get homeHealthCareService =>localizedValues['homeHealthCareService'][locale.languageCode]; localizedValues['myMedicalFileSubTitle'][locale.languageCode];
String get onlinePharmacy =>localizedValues['OnlinePharmacy'][locale.languageCode]; String get viewMore => localizedValues['viewMore'][locale.languageCode];
String get emergencyService =>localizedValues['EmergencyService'][locale.languageCode]; String get homeHealthCareService =>
String get onlinePaymentService =>localizedValues['OnlinePaymentService'][locale.languageCode]; localizedValues['homeHealthCareService'][locale.languageCode];
String get offersAndPackages =>localizedValues['OffersAndPackages'][locale.languageCode]; String get onlinePharmacy =>
String get comprehensiveMedicalCheckup =>localizedValues['ComprehensiveMedicalCheckup'][locale.languageCode]; localizedValues['OnlinePharmacy'][locale.languageCode];
String get hMGService =>localizedValues['HMGService'][locale.languageCode]; String get emergencyService =>
String get viewAllHabibMedicalService =>localizedValues['ViewAllHabibMedicalService'][locale.languageCode]; localizedValues['EmergencyService'][locale.languageCode];
String get viewAll =>localizedValues['viewAll'][locale.languageCode]; String get onlinePaymentService =>
String get contactUs =>localizedValues['ContactUs'][locale.languageCode]; localizedValues['OnlinePaymentService'][locale.languageCode];
String get viewAllWaysReachUs =>localizedValues['ViewAllWaysReachUs'][locale.languageCode]; String get offersAndPackages =>
String get medicalProfile =>localizedValues['medicalProfile'][locale.languageCode]; localizedValues['OffersAndPackages'][locale.languageCode];
String get parking =>localizedValues['parking'][locale.languageCode]; String get comprehensiveMedicalCheckup =>
String get alhabiServices =>localizedValues['alhabiServices'][locale.languageCode]; localizedValues['ComprehensiveMedicalCheckup'][locale.languageCode];
String get parkingTitle =>localizedValues['parkingTitle'][locale.languageCode]; String get hMGService => localizedValues['HMGService'][locale.languageCode];
String get readBarcode =>localizedValues['readBarcode'][locale.languageCode]; String get viewAllHabibMedicalService =>
String get showMyPark =>localizedValues['showMyPark'][locale.languageCode]; localizedValues['ViewAllHabibMedicalService'][locale.languageCode];
String get clearMyData =>localizedValues['clearMyData'][locale.languageCode]; String get viewAll => localizedValues['viewAll'][locale.languageCode];
String get floor =>localizedValues['floor'][locale.languageCode]; String get contactUs => localizedValues['ContactUs'][locale.languageCode];
String get gate =>localizedValues['gate'][locale.languageCode]; String get viewAllWaysReachUs =>
String get building =>localizedValues['building'][locale.languageCode]; localizedValues['ViewAllWaysReachUs'][locale.languageCode];
String get branch =>localizedValues['branch'][locale.languageCode]; String get medicalProfile =>
String get emergencyServices =>localizedValues['emergencyServices'][locale.languageCode]; localizedValues['medicalProfile'][locale.languageCode];
String get parking => localizedValues['parking'][locale.languageCode];
String get nearester=> localizedValues['nearester'][locale.languageCode]; String get alhabiServices =>
String get locationa=> localizedValues['locationa'][locale.languageCode]; localizedValues['alhabiServices'][locale.languageCode];
String get ambulancerequest=> localizedValues['ambulancerequest'][locale.languageCode]; String get parkingTitle =>
String get requestA=> localizedValues['requestA'][locale.languageCode]; localizedValues['parkingTitle'][locale.languageCode];
String get readBarcode => localizedValues['readBarcode'][locale.languageCode];
String get showMyPark => localizedValues['showMyPark'][locale.languageCode];
String get clearMyData => localizedValues['clearMyData'][locale.languageCode];
String get floor => localizedValues['floor'][locale.languageCode];
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];
String get nearester => localizedValues['nearester'][locale.languageCode];
String get locationa => localizedValues['locationa'][locale.languageCode];
String get ambulancerequest =>
localizedValues['ambulancerequest'][locale.languageCode];
String get requestA => localizedValues['requestA'][locale.languageCode];
String get consultation => String get consultation =>
localizedValues['consultation'][locale.languageCode]; localizedValues['consultation'][locale.languageCode];
String get logs => localizedValues['logs'][locale.languageCode]; String get logs => localizedValues['logs'][locale.languageCode];
String get textToSpeech => String get textToSpeech =>
localizedValues['textToSpeech'][locale.languageCode]; localizedValues['textToSpeech'][locale.languageCode];
String get myAppointments => localizedValues['MyAppointments'][locale.languageCode]; String get myAppointments =>
String get noBookedAppointments => localizedValues['NoBookedAppointments'][locale.languageCode]; localizedValues['MyAppointments'][locale.languageCode];
String get noConfirmedAppointments => localizedValues['NoConfirmedAppointments'][locale.languageCode]; String get noBookedAppointments =>
String get noArrivedAppointments => localizedValues['noArrivedAppointments'][locale.languageCode]; localizedValues['NoBookedAppointments'][locale.languageCode];
String get myAppointmentsList => localizedValues['MyAppointmentsList'][locale.languageCode]; String get noConfirmedAppointments =>
localizedValues['NoConfirmedAppointments'][locale.languageCode];
String get noArrivedAppointments =>
localizedValues['noArrivedAppointments'][locale.languageCode];
String get myAppointmentsList =>
localizedValues['MyAppointmentsList'][locale.languageCode];
String get radiology => localizedValues['Radiology'][locale.languageCode]; String get radiology => localizedValues['Radiology'][locale.languageCode];
String get radiologySubtitle => localizedValues['RadiologySubtitle'][locale.languageCode]; String get radiologySubtitle =>
localizedValues['RadiologySubtitle'][locale.languageCode];
String get lab => localizedValues['Lab'][locale.languageCode]; String get lab => localizedValues['Lab'][locale.languageCode];
String get labSubtitle => localizedValues['LabSubtitle'][locale.languageCode]; String get labSubtitle => localizedValues['LabSubtitle'][locale.languageCode];
String get medicines => localizedValues['Medicines'][locale.languageCode]; String get medicines => localizedValues['Medicines'][locale.languageCode];
String get medicinesSubtitle => localizedValues['MedicinesSubtitle'][locale.languageCode]; String get medicinesSubtitle =>
localizedValues['MedicinesSubtitle'][locale.languageCode];
String get vitalSigns => localizedValues['VitalSigns'][locale.languageCode]; String get vitalSigns => localizedValues['VitalSigns'][locale.languageCode];
String get vitalSignsSubtitle => localizedValues['VitalSignsSubTitle'][locale.languageCode]; String get vitalSignsSubtitle =>
localizedValues['VitalSignsSubTitle'][locale.languageCode];
String get myMedical => localizedValues['MyMedical'][locale.languageCode]; String get myMedical => localizedValues['MyMedical'][locale.languageCode];
String get myMedicalSubtitle => localizedValues['MyMedicalSubtitle'][locale.languageCode]; String get myMedicalSubtitle =>
localizedValues['MyMedicalSubtitle'][locale.languageCode];
String get myDoctor => localizedValues['MyDoctor'][locale.languageCode]; String get myDoctor => localizedValues['MyDoctor'][locale.languageCode];
String get myDoctorSubtitle => localizedValues['MyDoctorSubtitle'][locale.languageCode]; String get myDoctorSubtitle =>
localizedValues['MyDoctorSubtitle'][locale.languageCode];
String get eye => localizedValues['Eye'][locale.languageCode]; String get eye => localizedValues['Eye'][locale.languageCode];
String get eyeSubtitle => localizedValues['EyeSubtitle'][locale.languageCode]; String get eyeSubtitle => localizedValues['EyeSubtitle'][locale.languageCode];
String get insurance => localizedValues['Insurance'][locale.languageCode]; String get insurance => localizedValues['Insurance'][locale.languageCode];
String get insuranceSubtitle => localizedValues['InsuranceSubtitle'][locale.languageCode]; String get insuranceSubtitle =>
String get updateInsurance => localizedValues['UpdateInsurance'][locale.languageCode]; localizedValues['InsuranceSubtitle'][locale.languageCode];
String get updateInsuranceSubtitle => localizedValues['UpdateInsuranceSubtitle'][locale.languageCode]; String get updateInsurance =>
String get insuranceApproval => localizedValues['InsuranceApproval'][locale.languageCode]; localizedValues['UpdateInsurance'][locale.languageCode];
String get insuranceApprovalSubtitle => localizedValues['InsuranceApprovalSubtitle'][locale.languageCode]; String get updateInsuranceSubtitle =>
localizedValues['UpdateInsuranceSubtitle'][locale.languageCode];
String get insuranceApproval =>
localizedValues['InsuranceApproval'][locale.languageCode];
String get insuranceApprovalSubtitle =>
localizedValues['InsuranceApprovalSubtitle'][locale.languageCode];
String get allergies => localizedValues['Allergies'][locale.languageCode]; String get allergies => localizedValues['Allergies'][locale.languageCode];
String get allergiesSubtitle => localizedValues['AllergiesSubtitle'][locale.languageCode]; String get allergiesSubtitle =>
localizedValues['AllergiesSubtitle'][locale.languageCode];
String get myVaccines => localizedValues['MyVaccines'][locale.languageCode]; String get myVaccines => localizedValues['MyVaccines'][locale.languageCode];
String get myVaccinesSubtitle => localizedValues['MyVaccinesSubtitle'][locale.languageCode]; String get myVaccinesSubtitle =>
localizedValues['MyVaccinesSubtitle'][locale.languageCode];
String get medical => localizedValues['Medical'][locale.languageCode]; String get medical => localizedValues['Medical'][locale.languageCode];
String get medicalSubtitle => localizedValues['MedicalSubtitle'][locale.languageCode]; String get medicalSubtitle =>
localizedValues['MedicalSubtitle'][locale.languageCode];
String get monthly => localizedValues['Monthly'][locale.languageCode]; String get monthly => localizedValues['Monthly'][locale.languageCode];
String get monthlySubtitle => localizedValues['MonthlySubtitle'][locale.languageCode]; String get monthlySubtitle =>
localizedValues['MonthlySubtitle'][locale.languageCode];
String get sick => localizedValues['Sick'][locale.languageCode]; String get sick => localizedValues['Sick'][locale.languageCode];
String get sickSubtitle => localizedValues['SickSubtitle'][locale.languageCode]; String get sickSubtitle =>
localizedValues['SickSubtitle'][locale.languageCode];
String get myBalance => localizedValues['MyBalance'][locale.languageCode]; String get myBalance => localizedValues['MyBalance'][locale.languageCode];
String get myBalanceSubtitle => localizedValues['MyBalanceSubtitle'][locale.languageCode]; String get myBalanceSubtitle =>
localizedValues['MyBalanceSubtitle'][locale.languageCode];
String get patientCall => localizedValues['PatientCall'][locale.languageCode]; String get patientCall => localizedValues['PatientCall'][locale.languageCode];
String get patientCallSubtitle => localizedValues['PatientCallSubtitle'][locale.languageCode]; String get patientCallSubtitle =>
String get smartWatches => localizedValues['SmartWatches'][locale.languageCode]; localizedValues['PatientCallSubtitle'][locale.languageCode];
String get smartWatchesSubtitle => localizedValues['SmartWatchesSubtitle'][locale.languageCode]; String get smartWatches =>
localizedValues['SmartWatches'][locale.languageCode];
String get smartWatchesSubtitle =>
localizedValues['SmartWatchesSubtitle'][locale.languageCode];
String get myTrackers => localizedValues['MyTrackers'][locale.languageCode]; String get myTrackers => localizedValues['MyTrackers'][locale.languageCode];
String get myTrackersSubtitle => localizedValues['MyTrackersSubtitle'][locale.languageCode]; String get myTrackersSubtitle =>
localizedValues['MyTrackersSubtitle'][locale.languageCode];
String get askYour => localizedValues['AskYour'][locale.languageCode]; String get askYour => localizedValues['AskYour'][locale.languageCode];
String get askYourSubtitle => localizedValues['AskYourSubtitle'][locale.languageCode]; String get askYourSubtitle =>
localizedValues['AskYourSubtitle'][locale.languageCode];
String get internet => localizedValues['Internet'][locale.languageCode]; String get internet => localizedValues['Internet'][locale.languageCode];
String get internetSubtitle => localizedValues['InternetSubtitle'][locale.languageCode]; String get internetSubtitle =>
localizedValues['InternetSubtitle'][locale.languageCode];
String get chatbot => localizedValues['Chatbot'][locale.languageCode]; String get chatbot => localizedValues['Chatbot'][locale.languageCode];
String get chatbotSubtitle => localizedValues['ChatbotSubtitle'][locale.languageCode]; String get chatbotSubtitle =>
localizedValues['ChatbotSubtitle'][locale.languageCode];
String get timeLine => localizedValues['TimeLine'][locale.languageCode]; String get timeLine => localizedValues['TimeLine'][locale.languageCode];
String get labOrders => localizedValues['LabOrders'][locale.languageCode]; String get labOrders => localizedValues['LabOrders'][locale.languageCode];
String get billNo => localizedValues['BillNo'][locale.languageCode]; String get billNo => localizedValues['BillNo'][locale.languageCode];
String get prescriptions => localizedValues['Prescriptions'][locale.languageCode]; String get prescriptions =>
String get history => localizedValues['History'][locale.languageCode]; localizedValues['Prescriptions'][locale.languageCode];
String get orderNo => localizedValues['OrderNo'][locale.languageCode]; String get history => localizedValues['History'][locale.languageCode];
String get orderDetails => localizedValues['OrderDetails'][locale.languageCode]; String get orderNo => localizedValues['OrderNo'][locale.languageCode];
String get vitalSign => localizedValues['VitalSign'][locale.languageCode]; String get orderDetails =>
String get monthlyReports => localizedValues['MonthlyReports'][locale.languageCode]; localizedValues['OrderDetails'][locale.languageCode];
String get vitalSign => localizedValues['VitalSign'][locale.languageCode];
String get monthlyReports =>
localizedValues['MonthlyReports'][locale.languageCode];
String get locationDialogMessage => String get locationDialogMessage =>
localizedValues['locationDialogMessage'][locale.languageCode]; localizedValues['locationDialogMessage'][locale.languageCode];
String get userViewRequest =>
localizedValues['user-view-requester'][locale.languageCode];
String get userView => localizedValues['user-view'][locale.languageCode];
String get sentRequest =>
localizedValues['sent-requests'][locale.languageCode];
String get km => localizedValues['km'][locale.languageCode]; String get km => localizedValues['km'][locale.languageCode];
String get patientHealthSummaryReport => localizedValues['PatientHealthSummaryReport'][locale.languageCode]; String get patientHealthSummaryReport =>
String get toViewTheTermsAndConditions => localizedValues['ToViewTheTermsAndConditions'][locale.languageCode]; localizedValues['PatientHealthSummaryReport'][locale.languageCode];
String get toViewTheTermsAndConditions =>
localizedValues['ToViewTheTermsAndConditions'][locale.languageCode];
String get clickHere => localizedValues['ClickHere'][locale.languageCode]; String get clickHere => localizedValues['ClickHere'][locale.languageCode];
String get iAgreeToTheTermsAndConditions => localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode]; String get iAgreeToTheTermsAndConditions =>
String get iAgreeToTheTermsAndConditionsSubtitle => localizedValues['IAgreeToTheTermsAndConditionsSubtitle'][locale.languageCode]; localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode];
String get save => localizedValues['Save'][locale.languageCode]; String get iAgreeToTheTermsAndConditionsSubtitle =>
String get userAgreement => localizedValues['UserAgreement'][locale.languageCode]; localizedValues['IAgreeToTheTermsAndConditionsSubtitle']
String get updateSuccessfully => localizedValues['UpdateSuccessfully'][locale.languageCode]; [locale.languageCode];
String get emailSentSuccessfully => localizedValues['EmailSentSuccessfully'][locale.languageCode]; String get save => localizedValues['Save'][locale.languageCode];
String get checkVaccineAvailability => localizedValues['CHECK_VACCINE_AVAILABILITY'][locale.languageCode]; String get userAgreement =>
String get myVaccinesAvailability => localizedValues['MyVaccinesAvailability'][locale.languageCode]; localizedValues['UserAgreement'][locale.languageCode];
String get paymentService => localizedValues['PaymentService'][locale.languageCode]; String get updateSuccessfully =>
String get paymentOnline => localizedValues['PaymentOnline'][locale.languageCode]; localizedValues['UpdateSuccessfully'][locale.languageCode];
String get onlineCheckIn => localizedValues['OnlineCheckIn'][locale.languageCode]; String get emailSentSuccessfully =>
String get myBalances => localizedValues['MyBalances'][locale.languageCode]; localizedValues['EmailSentSuccessfully'][locale.languageCode];
String get balanceAmount => localizedValues['BalanceAmount'][locale.languageCode]; String get checkVaccineAvailability =>
String get totalBalance => localizedValues['TotalBalance'][locale.languageCode]; localizedValues['CHECK_VACCINE_AVAILABILITY'][locale.languageCode];
String get createAdvancedPayment => localizedValues['CreateAdvancedPayment'][locale.languageCode]; String get myVaccinesAvailability =>
String get advancePayment => localizedValues['AdvancePayment'][locale.languageCode]; localizedValues['MyVaccinesAvailability'][locale.languageCode];
String get advancePaymentLabel => localizedValues['AdvancePaymentLabel'][locale.languageCode]; String get paymentService =>
String get fileNumber => localizedValues['FileNumber'][locale.languageCode]; localizedValues['PaymentService'][locale.languageCode];
String get amount => localizedValues['Amount'][locale.languageCode]; String get paymentOnline =>
String get depositorEmail => localizedValues['DepositorEmail'][locale.languageCode]; localizedValues['PaymentOnline'][locale.languageCode];
String get notes => localizedValues['Notes'][locale.languageCode]; String get onlineCheckIn =>
String get selectPatientName => localizedValues['SelectPatientName'][locale.languageCode]; localizedValues['OnlineCheckIn'][locale.languageCode];
String get selectFamilyPatientName => localizedValues['SelectFamilyPatientName'][locale.languageCode]; String get myBalances => localizedValues['MyBalances'][locale.languageCode];
String get selectHospital => localizedValues['SelectHospital'][locale.languageCode]; String get balanceAmount =>
localizedValues['BalanceAmount'][locale.languageCode];
String get totalBalance =>
localizedValues['TotalBalance'][locale.languageCode];
String get createAdvancedPayment =>
localizedValues['CreateAdvancedPayment'][locale.languageCode];
String get advancePayment =>
localizedValues['AdvancePayment'][locale.languageCode];
String get advancePaymentLabel =>
localizedValues['AdvancePaymentLabel'][locale.languageCode];
String get fileNumber => localizedValues['FileNumber'][locale.languageCode];
String get amount => localizedValues['Amount'][locale.languageCode];
String get depositorEmail =>
localizedValues['DepositorEmail'][locale.languageCode];
String get notes => localizedValues['Notes'][locale.languageCode];
String get selectPatientName =>
localizedValues['SelectPatientName'][locale.languageCode];
String get selectFamilyPatientName =>
localizedValues['SelectFamilyPatientName'][locale.languageCode];
String get selectHospital =>
localizedValues['SelectHospital'][locale.languageCode];
String get myAccount => localizedValues['MyAccount'][locale.languageCode]; String get myAccount => localizedValues['MyAccount'][locale.languageCode];
String get otherAccount => localizedValues['OtherAccount'][locale.languageCode]; String get otherAccount =>
String get selectBeneficiary => localizedValues['SelectBeneficiary'][locale.languageCode]; localizedValues['OtherAccount'][locale.languageCode];
String get confirmThePayment => localizedValues['ConfirmThePayment'][locale.languageCode]; String get selectBeneficiary =>
String get depositorName => localizedValues['DepositorName'][locale.languageCode]; localizedValues['SelectBeneficiary'][locale.languageCode];
String get mobileNumber => localizedValues['MobileNumber'][locale.languageCode]; String get confirmThePayment =>
localizedValues['ConfirmThePayment'][locale.languageCode];
String get depositorName =>
localizedValues['DepositorName'][locale.languageCode];
String get mobileNumber =>
localizedValues['MobileNumber'][locale.languageCode];
String get ok => localizedValues['Ok'][locale.languageCode]; String get ok => localizedValues['Ok'][locale.languageCode];
String get theVerificationCodeExpiresIn => localizedValues['TheVerificationCodeExpiresIn'][locale.languageCode]; String get theVerificationCodeExpiresIn =>
String get pleaseEnterTheVerificationCode => localizedValues['PleaseEnterTheVerificationCode'][locale.languageCode]; localizedValues['TheVerificationCodeExpiresIn'][locale.languageCode];
String get eyeMeasurements => localizedValues['EyeMeasurements'][locale.languageCode]; String get pleaseEnterTheVerificationCode =>
String get measurements => localizedValues['Measurements'][locale.languageCode]; localizedValues['PleaseEnterTheVerificationCode'][locale.languageCode];
String get eyeMeasurements =>
localizedValues['EyeMeasurements'][locale.languageCode];
String get measurements =>
localizedValues['Measurements'][locale.languageCode];
String get classes => localizedValues['Classes'][locale.languageCode]; String get classes => localizedValues['Classes'][locale.languageCode];
String get contactLens => localizedValues['ContactLens'][locale.languageCode]; String get contactLens => localizedValues['ContactLens'][locale.languageCode];
String get rightEye => localizedValues['RightEye'][locale.languageCode]; String get rightEye => localizedValues['RightEye'][locale.languageCode];
@ -579,28 +655,32 @@ class TranslationBase {
String get power => localizedValues['Power'][locale.languageCode]; String get power => localizedValues['Power'][locale.languageCode];
String get diameter => localizedValues['Diameter'][locale.languageCode]; String get diameter => localizedValues['Diameter'][locale.languageCode];
String get remarks => localizedValues['Remarks'][locale.languageCode]; String get remarks => localizedValues['Remarks'][locale.languageCode];
String get activeMedications => localizedValues['ActiveMedications'][locale.languageCode]; String get activeMedications =>
localizedValues['ActiveMedications'][locale.languageCode];
String get expDate => localizedValues['ExpDate'][locale.languageCode]; String get expDate => localizedValues['ExpDate'][locale.languageCode];
String get route => localizedValues['Route'][locale.languageCode]; String get route => localizedValues['Route'][locale.languageCode];
String get frequency => localizedValues['Frequency'][locale.languageCode]; String get frequency => localizedValues['Frequency'][locale.languageCode];
String get dailyQuantity => localizedValues['DailyQuantity'][locale.languageCode]; String get dailyQuantity =>
localizedValues['DailyQuantity'][locale.languageCode];
String get addReminder => localizedValues['AddReminder'][locale.languageCode]; String get addReminder => localizedValues['AddReminder'][locale.languageCode];
String get reminderDes => localizedValues['reminderDes'][locale.languageCode]; String get reminderDes => localizedValues['reminderDes'][locale.languageCode];
String get startDay => localizedValues['StartDay'][locale.languageCode]; String get startDay => localizedValues['StartDay'][locale.languageCode];
String get endDay => localizedValues['EndDay'][locale.languageCode]; String get endDay => localizedValues['EndDay'][locale.languageCode];
String get days => localizedValues['Days'][locale.languageCode]; String get days => localizedValues['Days'][locale.languageCode];
String get scheduleTime => localizedValues['ScheduleTime'][locale.languageCode]; String get scheduleTime =>
localizedValues['ScheduleTime'][locale.languageCode];
String get askDoctor => localizedValues['AskDoctor'][locale.languageCode]; String get askDoctor => localizedValues['AskDoctor'][locale.languageCode];
String get doctorResponses => localizedValues['DoctorResponses'][locale.languageCode]; String get doctorResponses =>
localizedValues['DoctorResponses'][locale.languageCode];
String get newDes => localizedValues['New'][locale.languageCode]; String get newDes => localizedValues['New'][locale.languageCode];
String get all => localizedValues['All'][locale.languageCode]; String get all => localizedValues['All'][locale.languageCode];
String get questionHere => localizedValues['QuestionHere'][locale.languageCode]; String get questionHere =>
String get viewDoctorResponses => localizedValues['ViewDoctorResponses'][locale.languageCode]; localizedValues['QuestionHere'][locale.languageCode];
String get serviceInformationButton => localizedValues['ServiceInformationButton'][locale.languageCode]; String get viewDoctorResponses =>
localizedValues['ViewDoctorResponses'][locale.languageCode];String get serviceInformationButton => localizedValues['ServiceInformationButton'][locale.languageCode];
String get serviceInformationTitle => localizedValues['ServiceInformationTitle'][locale.languageCode]; String get serviceInformationTitle => localizedValues['ServiceInformationTitle'][locale.languageCode];
String get infoLab => localizedValues['info-lab'][locale.languageCode]; String get infoLab => localizedValues['info-lab'][locale.languageCode];
String get infoRadiology => localizedValues['info-radiology'][locale.languageCode]; String get infoRadiology => localizedValues['info-radiology'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -105,7 +105,7 @@ class _ButtonState extends State<Button> with TickerProviderStateMixin {
: 19), : 19),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.0)), borderRadius: BorderRadius.all(Radius.circular(10.0)),
color: widget.backgroundColor ?? Hexcolor('#515b5d'), color: widget.backgroundColor ?? HexColor('#515b5d'),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color.fromRGBO( color: Color.fromRGBO(

@ -155,7 +155,9 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
width: double.infinity, width: double.infinity,
child: Text(widget.details ?? 'No Data')), child: Text(widget.details ?? 'No Data')),
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
BaseView<LabsViewModel>( BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabResult( onModelReady: (model) => model.getPatientLabResult(
patientLabOrder: widget.patientLabOrder), patientLabOrder: widget.patientLabOrder),
@ -166,7 +168,8 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(
() {
_isShowMoreGeneral = !_isShowMoreGeneral; _isShowMoreGeneral = !_isShowMoreGeneral;
}, },
); );
@ -269,10 +272,14 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0.0): Radius.circular(10.0), topLeft: projectViewModel.isArabic
topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0), ? Radius.circular(0.0)
: Radius.circular(10.0),
topRight: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
), ),
), ),
child: Center( child: Center(
@ -287,8 +294,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white), child: Texts('Value', color: Colors.white),
@ -298,10 +304,14 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(10.0):Radius.circular(0.0), topLeft: projectViewModel.isArabic
topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0), ? Radius.circular(10.0)
: Radius.circular(0.0),
topRight: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(

@ -27,7 +27,7 @@ class MedicalProfileItem extends StatelessWidget {
title, title,
style: TextStyle( style: TextStyle(
fontSize: 1.5 * SizeConfig.textMultiplier, fontSize: 1.5 * SizeConfig.textMultiplier,
color: Hexcolor('#B8382C'), color: HexColor('#B8382C'),
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
RichText( RichText(

@ -225,7 +225,7 @@ class _TextsState extends State<Texts> {
fontStyle: widget.italic ? FontStyle.italic : null, fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color ?? Colors.black, color: widget.color ?? Colors.black,
fontSize: widget.fontSize ?? _getFontSize(), fontSize: widget.fontSize ?? _getFontSize(),
letterSpacing: widget.variant == "overline" ? 1.5 : null, letterSpacing: widget.variant == "overline" ? 1 : null,
fontWeight: widget.fontWeight ?? _getFontWeight(), fontWeight: widget.fontWeight ?? _getFontWeight(),
), ),
), ),

@ -8,14 +8,13 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStat
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/list/flexible_container.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../../config/size_config.dart'; import '../../config/size_config.dart';
import '../../locator.dart'; import '../../locator.dart';
import 'drawer_item_widget.dart'; import 'drawer_item_widget.dart';
@ -326,7 +325,6 @@ class _AppDrawerState extends State<AppDrawer> {
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
setState(() { setState(() {
this.user = data; this.user = data;
print(this.user);
}); });
} }
} }
@ -334,7 +332,6 @@ class _AppDrawerState extends State<AppDrawer> {
logout() async { logout() async {
authenticatedUserObject.logout(); authenticatedUserObject.logout();
await sharedPref.clear(); await sharedPref.clear();
this.user = null; this.user = null;
Navigator.of(context).pushNamed(HOME); Navigator.of(context).pushNamed(HOME);
} }
@ -366,7 +363,14 @@ class _AppDrawerState extends State<AppDrawer> {
this this
.familyFileProvider .familyFileProvider
.silentLoggin(user) .silentLoggin(user)
.then((value) => loginAfter(value, context)); .then((value) => loginAfter(value, context))
.catchError((err) {
print(err);
AppToast.showErrorToast(message: err);
Navigator.of(context).pop();
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
;
} }
loginAfter(result, context) { loginAfter(result, context) {

@ -74,6 +74,7 @@ class _MobileNo extends State<MobileNo> {
Container( Container(
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.grey), border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(10)), borderRadius: BorderRadius.circular(10)),
child: Row(children: <Widget>[ child: Row(children: <Widget>[
@ -88,6 +89,7 @@ class _MobileNo extends State<MobileNo> {
child: Text( child: Text(
countryCode, countryCode,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
)), )),
Expanded( Expanded(
flex: 4, flex: 4,

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:expandable/expandable.dart'; import 'package:expandable/expandable.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -6,49 +7,101 @@ import 'package:flutter/material.dart';
/// [bodyWidget] widget want to show in the body /// [bodyWidget] widget want to show in the body
/// [title] the widget title /// [title] the widget title
/// [collapsed] The widget shown in the collapsed state /// [collapsed] The widget shown in the collapsed state
class AppExpandableNotifier extends StatelessWidget { class AppExpandableNotifier extends StatefulWidget {
final Widget headerWidget; final Widget headerWidget;
final Widget bodyWidget; final Widget bodyWidget;
final String title; final String title;
final Widget collapsed; final Widget collapsed;
final Widget header; final bool isExpand;
bool expandFlag = false;
var controller = new ExpandableController();
AppExpandableNotifier( AppExpandableNotifier(
{this.headerWidget, this.bodyWidget, this.title, this.collapsed,this.header}); {this.headerWidget,
this.bodyWidget,
this.title,
this.collapsed,
this.isExpand});
_AppExpandableNotifier createState() => _AppExpandableNotifier();
}
class _AppExpandableNotifier extends State<AppExpandableNotifier> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
setState(() {
if (widget.isExpand == true) {
widget.expandFlag = widget.isExpand;
widget.controller.expanded = true;
}
});
return ExpandableNotifier( return ExpandableNotifier(
child: Padding( child: Padding(
padding: const EdgeInsets.only(left: 10,right: 10,top: 4), padding: const EdgeInsets.only(left: 10, right: 10, top: 4),
child: Card( child: Card(
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
child: headerWidget, child: widget.headerWidget,
), ),
ScrollOnExpand( ScrollOnExpand(
scrollOnExpand: true, scrollOnExpand: true,
scrollOnCollapse: false, scrollOnCollapse: false,
child: ExpandablePanel( child: ExpandablePanel(
hasIcon: false,
theme: const ExpandableThemeData( theme: const ExpandableThemeData(
headerAlignment: ExpandablePanelHeaderAlignment.center, headerAlignment: ExpandablePanelHeaderAlignment.center,
tapBodyToCollapse: true, tapBodyToCollapse: true,
), ),
header: header ?? Padding( header: Row(
padding: EdgeInsets.all(10), mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: Text( children: [
title?? 'Details', Padding(
style: TextStyle(fontWeight: FontWeight.bold,fontSize: 22,), padding: EdgeInsets.all(10),
), child: Text(
), widget.title ?? 'Details',
collapsed: collapsed ?? Container(), style: TextStyle(
expanded: bodyWidget, fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2,
),
),
),
new IconButton(
icon: new Container(
height: 28.0,
width: 30.0,
decoration: new BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
child: new Center(
child: new Icon(
widget.expandFlag
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.white,
size: 30.0,
),
),
),
onPressed: () {
setState(() {
widget.expandFlag = !widget.expandFlag;
if (widget.expandFlag == true) {
widget.controller.expanded = true;
} else {
widget.controller.expanded = false;
}
});
}),
]),
collapsed: widget.collapsed ?? Container(),
expanded: widget.bodyWidget,
builder: (_, collapsed, expanded) { builder: (_, collapsed, expanded) {
return Padding( return Padding(
padding: EdgeInsets.only(left: 5, right: 5, bottom: 5), padding: EdgeInsets.only(left: 5, right: 5, bottom: 5),
child: Expandable( child: Expandable(
controller: widget.controller,
collapsed: collapsed, collapsed: collapsed,
expanded: expanded, expanded: expanded,
theme: const ExpandableThemeData(crossFadePoint: 0), theme: const ExpandableThemeData(crossFadePoint: 0),

@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart'; import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/search.dart'; import 'package:diplomaticquarterapp/widgets/robo-search/search.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -29,6 +30,7 @@ class AppScaffold extends StatelessWidget {
final bool isShowAppBar; final bool isShowAppBar;
final bool hasAppBarParam; final bool hasAppBarParam;
final BaseViewModel baseViewModel; final BaseViewModel baseViewModel;
final bool isBottomBar;
final Widget floatingActionButton; final Widget floatingActionButton;
final String title; final String title;
final String description; final String description;
@ -48,7 +50,7 @@ class AppScaffold extends StatelessWidget {
this.floatingActionButton, this.floatingActionButton,
this.title, this.title,
this.description, this.description,
this.isShowDecPage = true}); this.isShowDecPage = true, this.isBottomBar});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -66,8 +68,7 @@ class AppScaffold extends StatelessWidget {
), ),
title: Text(authenticatedUserObject.isLogin title: Text(authenticatedUserObject.isLogin
? appBarTitle.toUpperCase() ? appBarTitle.toUpperCase()
: TranslationBase.of(context).serviceInformationTitle), : TranslationBase.of(context).serviceInformationTitle),leading: Builder(
leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return ArrowBack(); return ArrowBack();
}, },
@ -78,7 +79,7 @@ class AppScaffold extends StatelessWidget {
icon: Icon(FontAwesomeIcons.home), icon: Icon(FontAwesomeIcons.home),
color: Colors.white, color: Colors.white,
onPressed: () { onPressed: () {
Navigator.of(context).popUntil(ModalRoute.withName('/')); Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
}, },
), ),
], ],
@ -89,15 +90,17 @@ class AppScaffold extends StatelessWidget {
title: appBarTitle, title: appBarTitle,
description: description, description: description,
) )
: baseViewModel != null :baseViewModel != null
? NetworkBaseView( ? NetworkBaseView(
child: buildBodyWidget(), child: buildBodyWidget(),
baseViewModel: baseViewModel, baseViewModel: baseViewModel,
) )
: buildBodyWidget(), : buildBodyWidget(),
bottomSheet: bottomSheet, bottomSheet: bottomSheet,
// bottomNavigationBar: BottomBarSearch()
floatingActionButton: floatingActionButton ?? floatingActionButton, floatingActionButton: floatingActionButton ?? floatingActionButton,
// bottomNavigationBar:
// this.isBottomBar == true ? BottomBarSearch() : SizedBox()
// floatingActionButton: FloatingSearchButton(),
); );
} }
@ -106,6 +109,7 @@ class AppScaffold extends StatelessWidget {
} }
buildBodyWidget() { buildBodyWidget() {
return body; //Stack(children: <Widget>[body, buildAppLoaderWidget(isLoading)]); // return body; //Stack(children: <Widget>[body, buildAppLoaderWidget(isLoading)]);
return Stack(children: <Widget>[body, FloatingSearchButton()]);
} }
} }

@ -1,3 +1,4 @@
import 'dart:collection';
import 'dart:convert'; import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
@ -9,9 +10,22 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DoctorProfile.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/DoctorProfile.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/pages/ErService/NearestEr.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/my_admissions_page.dart'; import 'package:diplomaticquarterapp/pages/medical/my_admissions_page.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -32,6 +46,8 @@ import 'dart:math';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
class BottomBarSearch extends StatefulWidget { class BottomBarSearch extends StatefulWidget {
@override @override
@ -136,7 +152,7 @@ class _SearchBot extends State<BottomBarSearch> {
} }
Future _speak(reconizedWord) async { Future _speak(reconizedWord) async {
await flutterTts.speak(reconizedWord); //await flutterTts.speak(reconizedWord);
getPages(reconizedWord); getPages(reconizedWord);
} }
@ -192,89 +208,193 @@ class _SearchBot extends State<BottomBarSearch> {
searchProvider searchProvider
.getBotPages(request) .getBotPages(request)
.then((value) => {getCommands(value['Understand'])}); .then((value) => {getCommands(value['Understand'])});
//getDoctorsList(12, 17, 40036, context);
} }
getCommands(result) async { getCommands(result) async {
//RoboSearch.closeAlertDialog(context);
print(result); print(result);
results = result; results = result;
//getDoctorsList(12, 17, 40036, context);
switch (result["CommandNumber"]) { switch (result["CommandNumber"]) {
case 100: case '100':
if (result['ProjectId'] != 0 && {
result['ClinicId'] != 0 && List clnicID = unique(result['ClinicId']);
result['DoctorId'] != 0) { if (result['ProjectId'] != 0 &&
clnicID.length > 0 &&
result['DoctorId'].length > 0) {
if (clnicID.length == 1) {
getDoctorsList(
result['ProjectId'],
clnicID[0],
context,
doctorId: result['DoctorId'],
doctorName: null,
);
} else {
goToClinic(clnicID);
}
} else if (result['ProjectId'] != 0 &&
clnicID.length > 0 &&
result['DoctorId'].length == 0) {
if (clnicID.length == 1) {
getDoctorsList(
result['ProjectId'],
clnicID[0],
context,
);
} else {
goToClinic(clnicID);
}
} else if (result['ProjectId'] == 0 &&
clnicID.length > 0 &&
result['DoctorId'].length == 0) {
if (clnicID.length == 1) {
getDoctorsList(
result['ProjectId'],
clnicID[0],
context,
);
} else {
goToClinic(clnicID);
}
} else if (result['ProjectId'] == 0 &&
clnicID.length > 0 &&
result['DoctorId'].length > 0) {
if (clnicID.length == 1) {
getDoctorsList(
result['ProjectId'],
clnicID[0],
context,
doctorId: result['DoctorId'],
doctorName: null,
);
} else {
goToClinic(clnicID);
}
} else {
goToClinic(clnicID);
}
// speak();
}
break;
case '102':
{
getDoctorsList( getDoctorsList(
result['ProjectId'], 0,
result['ClinicId'], 0,
context, context,
doctorId: result['DoctorId'], doctorId: result['DoctorId'],
doctorName: result['DoctorName'], doctorName: null,
); );
} else if (result['ProjectId'] != 0 && }
result['ClinicId'] != 0 && break;
result['DoctorId'] == 0) { case '103':
getDoctorsList( {
result['ProjectId'], List clnicID = unique(result['ClinicId']);
result['ClinicId'], if (clnicID.length == 1) {
getDoctorsList(
0,
clnicID[0],
context,
doctorId: null,
doctorName: null,
);
} else {
goToClinic(clnicID);
}
}
break;
case '4':
{
Navigator.push(context, FadePage(page: LabsHomePage()));
}
break;
case '6':
{
Navigator.push(context, FadePage(page: RadiologyHomePage()));
}
break;
case '7':
{
Navigator.push(
context, context,
FadePage(
page: MyAppointments(),
),
); );
} else if (result['ProjectId'] == 0 && }
result['ClinicId'] != 0 && break;
result['DoctorId'] == 0) { case '8':
getDoctorsList( {
result['ProjectId'], Navigator.push(
result['ClinicId'],
context, context,
FadePage(
page: HomePrescriptionsPage(),
),
); );
} else if (result['ProjectId'] == 0 && }
result['ClinicId'] != 0 && break;
result['DoctorId'] != 0) { case '9':
getDoctorsList( {
result['ProjectId'], Navigator.push(
result['ClinicId'],
context, context,
doctorId: result['DoctorId'], FadePage(
doctorName: result['DoctorName'], page: DoctorHomePage(),
),
); );
} else { }
break;
case '10':
{
Navigator.push( Navigator.push(
AppGlobal.context, context,
MaterialPageRoute( FadePage(
builder: (context) => Search( page: VitalSignDetailsScreen(),
type: 0, ),
))); );
} }
speak();
break; break;
// case '101': case '11':
// Navigator.push( {
// AppGlobal.context, Navigator.push(context, FadePage(page: InsuranceUpdate()));
// MaterialPageRoute( }
// builder: (context) => Search( break;
// type: 0, case '12':
// ))); {
// break; Navigator.push(context, FadePage(page: InsuranceApproval()));
// case '102': }
// Navigator.push( break;
// AppGlobal.context, case '13':
// MaterialPageRoute( {
// builder: (context) => Search( Navigator.push(context, FadePage(page: MyVaccines()));
// type: 1, }
// ))); break;
// break; case '14':
// case '103': {
// eventProvider.setValue({"clinic_id": understand}); Navigator.push(context, FadePage(page: HomeReportPage()));
// break; }
break;
// case '104': case '5':
// eventProvider.setValue({"project_id": understand}); {
// break; Navigator.push(context, FadePage(page: NearestEr()));
// case '105': }
// eventProvider.setValue({"doctor_id": understand}); break;
// break; case '15':
{
Navigator.push(context, FadePage(page: PatientSickLeavePage()));
}
break;
case '16':
{
Navigator.push(context, FadePage(page: LiveCareHome()));
}
break;
case '200':
{
Navigator.push(context, FadePage(page: FeedbackHomePage()));
}
break;
default: default:
Navigator.of(context).pushNamed(HOME); Navigator.of(context).pushNamed(HOME);
speak(); speak();
@ -304,30 +424,58 @@ class _SearchBot extends State<BottomBarSearch> {
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
getDoctorsList(projectId, clinicId, context, {doctorId, doctorName}) { getDoctorsList(projectId, clinicId, context, {doctorId, doctorName}) {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
List<String> arr = [];
List<String> arrDistance = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.getDoctorsList(clinicId, projectId, false, context, doctorId: doctorName) .getDoctorsList(clinicId, projectId, false, context,
doctorId: doctorId, doctorName: doctorName)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
if (res['DoctorList'].length != 0) { if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null &&
res['SearchDoctorsByTime_IsVoiceCommandList'].length != 0) {
doctorsList.clear(); doctorsList.clear();
res['SearchDoctorsByTime_IsVoiceCommandList'].forEach((v1) {
v1['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
arr.add(new DoctorList.fromJson(v).projectName);
arrDistance.add(new DoctorList.fromJson(v)
.projectDistanceInKiloMeters
.toString());
});
});
if (doctorsList.length == 1) {
getDoctorProfile(
projectId, clinicId, doctorId[0], context, doctorsList);
//speak();
} else {
navigateToSearchResults(context, doctorsList, arr, arrDistance);
}
} else if (res['DoctorList'].length != 0) {
doctorsList.clear();
res['DoctorList'].forEach((v) { res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v)); doctorsList.add(new DoctorList.fromJson(v));
arr.add(new DoctorList.fromJson(v).projectName);
arrDistance.add(new DoctorList.fromJson(v)
.projectDistanceInKiloMeters
.toString());
}); });
if (res['DoctorList'].length == 1 && doctorId != null) {
if (doctorsList.length == 1) {
getDoctorProfile( getDoctorProfile(
projectId, clinicId, doctorId, context, doctorsList); projectId, clinicId, doctorId[0], context, doctorsList);
//speak(); //speak();
} else { } else {
navigateToSearchResults(context, doctorsList); navigateToSearchResults(context, doctorsList, arr, arrDistance);
} }
} }
}); });
@ -352,11 +500,23 @@ class _SearchBot extends State<BottomBarSearch> {
))); )));
} }
Future navigateToSearchResults(context, docList) async { Future navigateToSearchResults(context, docList, arr, arrDistance) async {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => SearchResults(doctorsList: docList)));
var result = LinkedHashSet<String>.from(arr).toList();
var numAll = result.length;
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => SearchResults(doctorsList: docList))); builder: (context) => BranchView(
doctorsList: docList,
result: result,
num: numAll,
resultDistance: arrDistance),
),
);
} }
speak() async { speak() async {
@ -369,4 +529,19 @@ class _SearchBot extends State<BottomBarSearch> {
// initSpeechState().then((value) => startVoiceSearch()); // initSpeechState().then((value) => startVoiceSearch());
// }); // });
} }
goToClinic(List ids) {
Navigator.push(
AppGlobal.context,
MaterialPageRoute(
builder: (context) => Search(
type: 0,
clnicIds: ids,
)));
speak();
}
List unique(List list) {
return list.toSet().toList();
}
} }

@ -1,22 +1,865 @@
import 'dart:collection';
import 'dart:io';
import 'dart:math';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart';
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/pages/Blood/my_balance_page.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/ErService/AmbulanceReq.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/ErService/NearestEr.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/login/welcome.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart';
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart'; import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/search.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter_tts/flutter_tts.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_recognition_result.dart';
import 'package:speech_to_text/speech_to_text.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DoctorProfile.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:flutter/cupertino.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:url_launcher/url_launcher.dart';
class FloatingSearchButton extends StatefulWidget {
@override
_FloatingSearchButton createState() => _FloatingSearchButton();
}
class _FloatingSearchButton extends State<FloatingSearchButton>
with TickerProviderStateMixin {
Offset position = Offset(250, 400);
bool activeAnimation = false;
bool isShow = true;
SearchProvider searchProvider = new SearchProvider();
RobotProvider eventProvider = RobotProvider();
bool isLoading = false;
bool isError = false;
final SpeechToText speech = SpeechToText();
String error = '';
String _currentLocaleId = "";
String lastError;
double level = 0.0;
var searchText;
double minSoundLevel = 50000;
double maxSoundLevel = -50000;
String reconizedWord = '';
FlutterTts flutterTts = FlutterTts();
var selectedLang;
bool isSearching = false;
Map results = {};
String lastStatus;
AuthenticatedUser user;
bool _isInit = true;
var event = RobotProvider();
var sharedPref = new AppSharedPreferences();
bool _hasSpeech = false;
ProjectViewModel projectProvider;
@override
void initState() {
event.controller.stream.listen((p) {
if (p['isRobot'] == 'true') {
if (this.mounted) {
setState(() {
position = Offset(250, 400);
activeAnimation = false;
});
}
}
});
Future.delayed(const Duration(seconds: 2), () {
// _currentLocaleId =
// TranslationBase.of(AppGlobal.context).locale.languageCode == 'en'
// ? 'en-US'
// : 'ar-SA';
requestPermissions();
getUserData();
});
super.initState();
}
class FloatingSearchButton extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Padding( projectProvider = Provider.of(context);
padding: const EdgeInsets.only(bottom: 80), return AnimatedPositioned(
child: FloatingActionButton( onEnd: () {
child: Icon(Icons.mic), // setState(() {
onPressed: () { // this.isShow = false;
SearchBot(); // position = Offset(250, 400);
}, // });
)); },
} left: activeAnimation
? TranslationBase.of(AppGlobal.context).locale.languageCode == 'en'
roboSearch(context) { ? 300
var dialog = RoboSearch(context: context); : 0
dialog.showAlertDialog(context); : position.dx,
top: activeAnimation ? -150 : position.dy,
duration: activeAnimation
? const Duration(seconds: 1)
: const Duration(seconds: 0),
// curve: Curves.bounceOut,
child: isShow
? Draggable(
feedback: Container(child: getStack()),
child: getStack(),
childWhenDragging: Container(
color: Colors.transparent,
),
onDragEnd: (details) {
setState(() {
position = details.offset;
});
})
: Container());
// Draggable(
// feedback: getStack(),
// childWhenDragging: Container(),
// child: getStack(),
// onDragEnd: (drag) {
// setState(() {
// top = top + drag.offset.dy < 0 ? 0 : top + drag.offset.dy;
// left = left + drag.offset.dx < 0 ? 0 : left + drag.offset.dx;
// });
// });
}
Widget getStack() {
return Container(
height: 150,
width: 150,
child: Stack(children: <Widget>[
// Column(
// mainAxisSize: MainAxisSize.min,
// crossAxisAlignment: CrossAxisAlignment.stretch,
// children: <Widget>[
GestureDetector(
child: Container(
child: Image.asset('assets/images/robort.png'),
),
onTap: () {
showDialog(
context: context,
builder: (_) {
return RoboSearch();
});
initSpeechState().then((value) => {startVoiceSearch()});
},
),
// ],
// ),
Positioned(
right: 0.0,
top: 10,
child: GestureDetector(
onTap: () {
setState(() {
if (this.mounted) {
activeAnimation = true;
}
});
},
child: Align(
alignment: Alignment.topRight,
child: CircleAvatar(
radius: 14.0,
backgroundColor: Colors.red,
child: Icon(Icons.close, color: Colors.white),
),
),
),
),
]));
}
startVoiceSearch() async {
_currentLocaleId =
TranslationBase.of(AppGlobal.context).locale.languageCode;
speech.listen(
onResult: resultListener,
listenFor: Duration(seconds: 10),
localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
onSoundLevelChange: soundLevelListener,
cancelOnError: true,
partialResults: true,
onDevice: true,
listenMode: ListenMode.deviceDefault);
}
void resultListener(SpeechRecognitionResult result) {
// lastWords = "${result.recognizedWords} - ${result.finalResult}";
print(result);
reconizedWord = result.recognizedWords;
event.setValue({"searchText": reconizedWord});
if (result.finalResult == true) {
// setState(() {
// setState(() {
// searchText = reconizedWord;
// });
Future.delayed(const Duration(seconds: 1), () {
_speak(reconizedWord);
});
}
//});
}
Future _speak(reconizedWord) async {
Navigator.of(AppGlobal.context).pop();
//await flutterTts.speak(reconizedWord);
//RoboSearch.closeAlertDialog(context);
getPages(reconizedWord);
}
void soundLevelListener(double level) {
minSoundLevel = min(minSoundLevel, level);
maxSoundLevel = max(maxSoundLevel, level);
// print("sound level $level: $minSoundLevel - $maxSoundLevel ");
//setState(() {
this.level = level;
// });
}
void requestPermissions() async {
Map<Permission, PermissionStatus> statuses = await [
Permission.microphone,
].request();
}
Future<void> initSpeechState() async {
bool hasSpeech = await speech.initialize(
onError: errorListener, onStatus: statusListener);
//if (hasSpeech) {
// _currentLocaleId =
// _currentLocaleId == 'en'
// ? 'en-US'
// : 'ar-SA'; // systemLocale.localeId;
// }
if (!mounted) return;
// setState(() {
// _hasSpeech = hasSpeech;
// });
}
void errorListener(SpeechRecognitionError error) {
print(error);
event.setValue({"searchText": 'null'});
//setState(() {
// reconizedWord = "${error.errorMsg} - ${error.permanent}";
//});
}
void statusListener(String status) {
//setState(() {
reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....';
//});
}
getPages(text) {
var request = {
'VoiceMessage': text,
'Lang': _currentLocaleId == 'en' ? 'En' : 'Ar'
};
searchProvider
.getBotPages(request)
.then((value) => {getCommands(value['Understand'])});
}
getCommands(result) async {
print(result);
results = result;
switch (result["CommandNumber"]) {
case '100':
{
getDoctorsList(
result['ProjectId'],
result['ClinicId'].length > 0 ? result['ClinicId'][0] : 0,
context,
doctorId: result['DoctorId'],
doctorName: null,
);
// List clnicID = unique(result['ClinicId']);
// if (result['ProjectId'] != 0 &&
// clnicID.length > 0 &&
// result['DoctorId'].length > 0) {
// if (clnicID.length == 1) {
// getDoctorsList(
// result['ProjectId'],
// clnicID[0],
// context,
// doctorId: result['DoctorId'],
// doctorName: null,
// );
// } else {
// goToClinic(clnicID);
// }
// } else if (result['ProjectId'] != 0 &&
// clnicID.length > 0 &&
// result['DoctorId'].length == 0) {
// if (clnicID.length == 1) {
// getDoctorsList(
// result['ProjectId'],
// clnicID[0],
// context,
// );
// } else {
// goToClinic(clnicID);
// }
// } else if (result['ProjectId'] == 0 &&
// clnicID.length > 0 &&
// result['DoctorId'].length == 0) {
// if (clnicID.length == 1) {
// getDoctorsList(
// result['ProjectId'],
// clnicID[0],
// context,
// );
// } else {
// goToClinic(clnicID);
// }
// } else if (result['ProjectId'] == 0 &&
// clnicID.length > 0 &&
// result['DoctorId'].length > 0) {
// if (clnicID.length == 1) {
// getDoctorsList(
// result['ProjectId'],
// clnicID[0],
// context,
// doctorId: result['DoctorId'],
// doctorName: null,
// );
// } else {
// goToClinic(clnicID);
// }
// } else {
// goToClinic(clnicID);
// }
// speak();
}
break;
case '102':
{
getDoctorsList(
0,
0,
context,
doctorId: result['DoctorId'],
doctorName: null,
);
}
break;
case '103':
{
List clnicID = unique(result['ClinicId']);
if (clnicID.length == 1) {
getDoctorsList(
0,
clnicID[0],
context,
doctorId: null,
doctorName: null,
);
} else {
goToClinic(clnicID);
}
}
break;
case '104':
{
List clnicID = unique(result['ClinicId']);
//= result['ProjectId'] ? result['ProjectId'] : 0; //result['ProjectId'];
if (clnicID.length == 1) {
getDoctorsList(result['ProjectId'], clnicID[0], context,
doctorId: null, doctorName: null, isNearest: true);
} else {
goToClinic(clnicID);
}
}
break;
case '4':
{
Navigator.push(context, FadePage(page: LabsHomePage()));
}
break;
case '6':
{
Navigator.push(context, FadePage(page: RadiologyHomePage()));
}
break;
case '7':
{
Navigator.push(
context,
FadePage(
page: MyAppointments(),
),
);
}
break;
case '8':
{
Navigator.push(
context,
FadePage(
page: HomePrescriptionsPage(),
),
);
}
break;
case '9':
{
Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
),
);
}
break;
case '10':
{
Navigator.push(
context,
FadePage(
page: VitalSignDetailsScreen(),
),
);
}
break;
case '11':
{
Navigator.push(context, FadePage(page: InsuranceUpdate()));
}
break;
case '12':
{
Navigator.push(context, FadePage(page: InsuranceApproval()));
}
break;
case '13':
{
Navigator.push(context, FadePage(page: MyVaccines()));
}
break;
case '14':
{
Navigator.push(context, FadePage(page: HomeReportPage()));
}
break;
case '5':
{
Navigator.push(context, FadePage(page: NearestEr()));
}
break;
case '15':
{
Navigator.push(context, FadePage(page: PatientSickLeavePage()));
}
break;
case '16':
{
Navigator.push(context, FadePage(page: MyBalancePage()));
}
break;
case '17':
{
Navigator.push(context, FadePage(page: MedicalProfilePage()));
}
break;
case '18':
{
//Drivethrough need to be implemeted here.
}
break;
case '19':
{
Navigator.push(context, FadePage(page: LiveCareHome()));
}
break;
case '20':
{
//CMC service need to be implemeted
}
break;
case '21':
{
Navigator.push(context, FadePage(page: MyFamily()));
}
break;
case '22':
{
Navigator.push(context, FadePage(page: BloodDonationPage()));
}
break;
case '23':
{
//health calculator need to be implemeted
}
break;
case '24':
{
Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: "HMG News",
selectedUrl:
"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
)));
}
break;
case '25':
{
if (user == null) {
Navigator.push(context, FadePage(page: WelcomeLogin()));
}
}
break;
case '26':
{
Navigator.push(context, FadePage(page: ParkingPage()));
}
break;
case '27':
{
Navigator.push(
context,
FadePage(
page: ErOptions(
isAppbar: true,
)));
}
break;
case '28':
{
Navigator.push(context, FadePage(page: AmbulanceReq()));
}
break;
case '29':
{
Navigator.push(context, FadePage(page: FindUsPage()));
}
break;
case '30':
{
launch("tel://" + result['PhoneNumbers'][0]);
}
break;
case '31':
{
Navigator.of(context).popUntil(ModalRoute.withName('/'));
}
break;
case '32':
{
Navigator.push(context, FadePage(page: AdvancePaymentPage()));
}
break;
case '33':
{
if (result['LanguageCode'] != '0') {
if (projectProvider.isArabic) {
projectProvider.changeLanguage('en');
} else {
projectProvider.changeLanguage('ar');
}
}
}
break;
case '34':
{
//settings page need to be implemented here
}
break;
case '35':
{
if (Platform.isIOS) {
launch(
"https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
} else {
launch(
"https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
}
}
break;
case '36':
{
Navigator.of(context).pushNamed(
REGISTER,
);
}
break;
case '37':
{
Navigator.of(context).pushNamed(
SYMPTOM_CHECKER,
);
}
break;
case '38':
{
await this.sharedPref.setInt(IS_SEARCH_APPO, 1);
Navigator.push(context, FadePage(page: MyAppointments()));
}
break;
case '39':
{
await this.sharedPref.setInt(IS_SEARCH_APPO, 2);
Navigator.push(context, FadePage(page: MyAppointments()));
}
break;
case '40':
{
//Home health care service need to be implemeted here
}
break;
case '41':
{
Navigator.push(context, FadePage(page: PaymentService()));
}
break;
case '42':
{
//weather indicator need to be implemented here
}
break;
case '43':
{
await this.sharedPref.setInt(IS_SEARCH_APPO, 3);
Navigator.push(context, FadePage(page: MyAppointments()));
}
break;
case '44':
{
//chat need be implmented here.
}
break;
case '45':
{
launch('https://hmg.com/ir/ar/Pages/ShareInformation/home.aspx');
}
break;
case '46':
{
launch('https://hmg.com/ir/ar/pages/home.aspx');
}
break;
case '200':
{
Navigator.push(context, FadePage(page: FeedbackHomePage()));
}
break;
default:
Navigator.of(AppGlobal.context).pushNamed(HOME);
speak();
break;
}
}
getDoctorProfile(projectId, clinicId, doctorId, context, doctorData) {
List<DoctorProfileList> docProfileList = [];
DoctorsListService service = new DoctorsListService();
service
.getDoctorsProfile(doctorId, clinicId, projectId, context)
.then((res) {
if (res['MessageStatus'] == 1) {
if (res['DoctorProfileList'].length != 0) {
res['DoctorProfileList'].forEach((v) {
docProfileList.add(new DoctorProfileList.fromJson(v));
});
}
navigateToDoctorProfile(context, doctorData[0], docProfileList[0],
isAppo: true);
//speak();
}
}).catchError((err) {
print(err);
});
}
getDoctorsList(projectId, clinicId, context,
{doctorId, doctorName, isNearest = false}) {
List<DoctorList> doctorsList = [];
List<String> arr = [];
List<String> arrDistance = [];
DoctorsListService service = new DoctorsListService();
service
.getDoctorsList(clinicId, projectId, isNearest, context,
doctorId: doctorId, doctorName: doctorName)
.then((res) {
if (res['MessageStatus'] == 1) {
setState(() {
if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null &&
res['SearchDoctorsByTime_IsVoiceCommandList'].length != 0) {
doctorsList.clear();
res['SearchDoctorsByTime_IsVoiceCommandList'].forEach((v1) {
v1['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
arr.add(new DoctorList.fromJson(v).projectName);
arrDistance.add(new DoctorList.fromJson(v)
.projectDistanceInKiloMeters
.toString());
});
});
if (doctorsList.length == 1) {
getDoctorProfile(
projectId, clinicId, doctorId[0], context, doctorsList);
//speak();
} else {
navigateToSearchResults(context, doctorsList, arr, arrDistance);
}
} else if (res['DoctorList'].length != 0) {
doctorsList.clear();
res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
arr.add(new DoctorList.fromJson(v).projectName);
arrDistance.add(new DoctorList.fromJson(v)
.projectDistanceInKiloMeters
.toString());
});
if (doctorsList.length == 1) {
getDoctorProfile(
projectId, clinicId, doctorId[0], context, doctorsList);
//speak();
} else {
navigateToSearchResults(context, doctorsList, arr, arrDistance);
}
}
});
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
Future navigateToDoctorProfile(context, docObject, docProfile,
{isAppo}) async {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => DoctorProfile(
doctor: docObject,
docProfileList: docProfile,
isOpenAppt: isAppo,
)));
}
Future navigateToSearchResults(context, docList, arr, arrDistance) async {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => SearchResults(doctorsList: docList)));
var result = LinkedHashSet<String>.from(arr).toList();
var numAll = result.length;
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => BranchView(
doctorsList: docList,
result: result,
num: numAll,
resultDistance: arrDistance),
),
);
}
speak() async {
if (_currentLocaleId == 'en' && results['ReturnMessage'] != null) {
await flutterTts.setVoice("en-us-x-sfg#male_2-local");
await flutterTts.setLanguage("en-US");
await flutterTts.speak(results['ReturnMessage']);
} else if (results['ReturnMessage_Ar'] != null) {
await flutterTts.setLanguage("ar-SA");
await flutterTts.setVoice("ar-sa-x-sfg#male_1-local");
await flutterTts.speak(results['ReturnMessage_Ar']);
}
// Future.delayed(const Duration(seconds: 10), () {
// initSpeechState().then((value) => startVoiceSearch());
// });
}
goToClinic(List ids) {
Navigator.push(
AppGlobal.context,
MaterialPageRoute(
builder: (context) => Search(
type: 0,
clnicIds: ids,
)));
speak();
}
List unique(List list) {
return list.toSet().toList();
}
getUserData() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
//setState(() async {
user = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
// });
}
print(_currentLocaleId);
} }
} }

@ -3,11 +3,9 @@ import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class NotAutPage extends StatelessWidget { class NotAutPage extends StatelessWidget {
@ -30,7 +28,7 @@ class NotAutPage extends StatelessWidget {
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontSize: 25, fontSize: 25,
bold: true, bold: true,
color: Hexcolor("#60686b"), color: Color(0xff60686b),
), ),
SizedBox( SizedBox(
height: 12, height: 12,

@ -30,10 +30,10 @@ class SMSOTP {
); );
Map verifyAccountFormValue = { Map verifyAccountFormValue = {
'digit1': null, 'digit1': '',
'digit2': null, 'digit2': '',
'digit3': null, 'digit3': '',
'digit4': null, 'digit4': '',
}; };
final focusD1 = FocusNode(); final focusD1 = FocusNode();
final focusD2 = FocusNode(); final focusD2 = FocusNode();
@ -106,7 +106,7 @@ class SMSOTP {
onChanged: (val) { onChanged: (val) {
if (val.length == 1) { if (val.length == 1) {
FocusScope.of(context).requestFocus(focusD2); FocusScope.of(context).requestFocus(focusD2);
verifyAccountFormValue['digit1'] = val; verifyAccountFormValue['digit1'] = val.trim();
checkValue(); checkValue();
} }
}, },
@ -130,7 +130,7 @@ class SMSOTP {
if (val.length == 1) { if (val.length == 1) {
FocusScope.of(context) FocusScope.of(context)
.requestFocus(focusD3); .requestFocus(focusD3);
verifyAccountFormValue['digit2'] = val; verifyAccountFormValue['digit2'] = val.trim();
checkValue(); checkValue();
} }
}, },
@ -155,7 +155,7 @@ class SMSOTP {
if (val.length == 1) { if (val.length == 1) {
FocusScope.of(context) FocusScope.of(context)
.requestFocus(focusD4); .requestFocus(focusD4);
verifyAccountFormValue['digit3'] = val; verifyAccountFormValue['digit3'] = val.trim();
checkValue(); checkValue();
} }
}, },
@ -175,7 +175,7 @@ class SMSOTP {
}, },
onChanged: (val) { onChanged: (val) {
if (val.length == 1) { if (val.length == 1) {
verifyAccountFormValue['digit4'] = val; verifyAccountFormValue['digit4'] = val.trim();
checkValue(); checkValue();
} }
}, },
@ -241,10 +241,10 @@ class SMSOTP {
checkValue() { checkValue() {
//print(verifyAccountFormValue); //print(verifyAccountFormValue);
if (verifyAccountFormValue['digit1'] != null && if (verifyAccountFormValue['digit1'] != ''&&
verifyAccountFormValue['digit2'] != null && verifyAccountFormValue['digit2'] != '' &&
verifyAccountFormValue['digit3'] != null && verifyAccountFormValue['digit3'] != '' &&
verifyAccountFormValue['digit4'] != null) { verifyAccountFormValue['digit4'] != '') {
onSuccess(verifyAccountFormValue['digit1'] + onSuccess(verifyAccountFormValue['digit1'] +
verifyAccountFormValue['digit2'] + verifyAccountFormValue['digit2'] +
verifyAccountFormValue['digit3'] + verifyAccountFormValue['digit3'] +

@ -1,42 +1,249 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/others/floating_button_search.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/search.dart'; import 'package:diplomaticquarterapp/widgets/robo-search/search.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class RoboSearch { class RoboSearch extends StatefulWidget {
final BuildContext context; @override
_RoboSearch createState() => new _RoboSearch();
}
RoboSearch({ class _RoboSearch extends State<RoboSearch> {
@required this.context, var event = RobotProvider();
}); var searchText = '';
bool isRetry = false;
var tween = Tween(begin: 0.0, end: 1.0).chain(CurveTween(curve: Curves.ease));
showAlertDialog(BuildContext context) { @override
// set up the buttons void initState() {
event.controller.stream.listen((p) {
if (p['searchText'] != null) {
if (p['searchText'] == 'null') {
//Future.delayed(const Duration(seconds: 1), () {
if (mounted) {
setState(() {
isRetry = true;
searchText = '';
});
}
//});
} else {
if (mounted) {
setState(() {
searchText = p['searchText'];
});
}
}
}
});
super.initState();
}
// set up the AlertDialog @override
AlertDialog alert = AlertDialog( Widget build(BuildContext context) {
title: Center(child: Text(TranslationBase.of(context).search)), return AlertDialog(
content: StatefulBuilder( content: Container(
builder: (BuildContext context, StateSetter setState) {
return Container(
color: Colors.white, color: Colors.white,
height: SizeConfig.realScreenHeight * 0.5, height: SizeConfig.realScreenHeight * 0.5,
width: SizeConfig.realScreenWidth * 0.8, width: SizeConfig.realScreenWidth * 0.8,
child: Container()); child: Container(
}), child: Column(
); mainAxisAlignment: MainAxisAlignment.center,
children: [
// show the dialog isRetry == true
showDialog( ? Column(
context: context, mainAxisAlignment: MainAxisAlignment.center,
builder: (BuildContext context) { children: [
return alert; Container(
}, margin: EdgeInsets.all(20),
); padding: EdgeInsets.all(10),
} decoration: BoxDecoration(
borderRadius:
static closeAlertDialog(BuildContext context) { BorderRadius.circular(100),
Navigator.of(context).pop(); border: Border.all(
width: 5, color: Colors.red)),
child: Icon(
Icons.mic,
color: Colors.blue,
size: 48,
)),
Center(
child: AppText(
"Didn't catch that, Try speaking again",
fontSize: 14,
)),
RaisedButton(
color: Colors.transparent,
onPressed: () {
setState(() {
isRetry = false;
});
FloatingSearchButton()
.createState()
.startVoiceSearch();
},
child: AppText(
'Try again',
color: Colors.blue,
))
])
: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.all(20),
padding: EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(100)),
child: Icon(
Icons.mic,
color: Colors.white,
size: 48,
)),
SizedBox(height: 20),
Center(
child: Text(searchText == ''
? 'Try saying something'
: searchText))
],
)
]),
)));
} }
} }
// class RoboSearch {
// final BuildContext context;
// var event = RobotProvider();
// var searchText = '';
// bool isRetry = false;
// var tween = Tween(begin: 0.0, end: 1.0).chain(CurveTween(curve: Curves.ease));
// RoboSearch({
// @required this.context,
// });
// showAlertDialog(BuildContext context) {
// // set up the buttons
// // set up the AlertDialog
// AlertDialog alert = AlertDialog(
// content: StatefulBuilder(
// builder: (BuildContext context, StateSetter setState) {
// event.controller.stream.listen((p) {
// if (p['searchText'] != null) {
// if (p['searchText'] == 'null') {
// Future.delayed(const Duration(seconds: 1), ()
// {
// setState(() {
// isRetry = true;
// searchText = '';
// });
// });
// } else {
// Future.delayed(const Duration(seconds: 1), ()
// {
// setState(() {
// searchText = p['searchText'];
// });
// });
// }
// }
// });
// return Container(
// color: Colors.white,
// height: SizeConfig.realScreenHeight * 0.5,
// width: SizeConfig.realScreenWidth * 0.8,
// child: Container(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// isRetry == true
// ? Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Container(
// margin: EdgeInsets.all(20),
// padding: EdgeInsets.all(10),
// decoration: BoxDecoration(
// borderRadius:
// BorderRadius.circular(100),
// border: Border.all(
// width: 5, color: Colors.red)),
// child: Icon(
// Icons.mic,
// color: Colors.blue,
// size: 48,
// )),
// Center(
// child: AppText(
// "Didn't catch that, Try speaking again",
// fontSize: 14,
// )),
// RaisedButton(
// color: Colors.transparent,
// onPressed: () {
// setState(() {
// isRetry = false;
// });
// startVoiceSearch();
// },
// child: AppText(
// 'Try again',
// color: Colors.blue,
// ))
// ])
// : Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Container(
// margin: EdgeInsets.all(20),
// padding: EdgeInsets.all(20),
// decoration: BoxDecoration(
// color: Colors.blue,
// borderRadius: BorderRadius.circular(100)),
// child: Icon(
// Icons.mic,
// color: Colors.white,
// size: 48,
// )),
// SizedBox(height: 20),
// Center(
// child: Text(searchText == ''
// ? 'Try saying something'
// : searchText))
// ],
// )
// ]),
// ));
// }),
// );
// // show the dialog
// showDialog(
// context: context,
// builder: (BuildContext context) {
// return alert;
// },
// );
// }
// static closeAlertDialog(BuildContext context) {
// Navigator.of(context).pop();
// }
// startVoiceSearch() {
// // Navigator.of(context).pop();
// //this.showAlertDialog(context);
// // new RoboSearch(context: context).showAlertDialog(context);
// FloatingSearchButton().createState().startVoiceSearch();
// }
// }

@ -30,7 +30,7 @@ class SearchBot with ChangeNotifier {
} }
SearchProvider searchProvider = new SearchProvider(); SearchProvider searchProvider = new SearchProvider();
RobotProvider eventProvider = RobotProvider(); // RobotProvider eventProvider = RobotProvider();
bool isLoading = false; bool isLoading = false;
bool isError = false; bool isError = false;
final SpeechToText speech = SpeechToText(); final SpeechToText speech = SpeechToText();
@ -203,19 +203,19 @@ class SearchBot with ChangeNotifier {
type: 1, type: 1,
))); )));
break; break;
case '103': // case '103':
eventProvider.setValue({"clinic_id": understand}); // eventProvider.setValue({"clinic_id": understand});
break; // break;
case '104': // case '104':
eventProvider.setValue({"project_id": understand}); // eventProvider.setValue({"project_id": understand});
break; // break;
case '105': // case '105':
eventProvider.setValue({"doctor_id": understand}); // eventProvider.setValue({"doctor_id": understand});
break; // break;
default: default:
{ {
eventProvider.setValue({"doctor_id": '40036'}); //eventProvider.setValue({"doctor_id": '40036'});
//eventProvider.setValue(); //eventProvider.setValue();
// if (result['CommandNumber'] == '0') { // if (result['CommandNumber'] == '0') {
// searchProvider.setData(understand); // searchProvider.setData(understand);

@ -20,7 +20,7 @@ dependencies:
webview_flutter: ^0.3.24 webview_flutter: ^0.3.24
# http client # http client
http: ^0.12.1 http: ^0.12.1
connectivity: ^0.4.9 connectivity: ^0.4.9+3
# State Management # State Management
provider: ^4.3.2+2 provider: ^4.3.2+2
@ -123,7 +123,7 @@ dependencies:
#local_notifications #local_notifications
flutter_local_notifications: ^1.4.4+4 flutter_local_notifications: ^1.5.0
#rxdart #rxdart
rxdart: ^0.24.1 rxdart: ^0.24.1
@ -168,6 +168,7 @@ flutter:
- assets/images/login/ - assets/images/login/
- assets/json/ - assets/json/
- assets/sounds/ - assets/sounds/
- assets/images/svg/
- assets/tracker/ - assets/tracker/

Loading…
Cancel
Save