diff --git a/Runner 2021-01-01 21-59-41/DiplomaticQuarter.ipa b/Runner 2021-01-01 21-59-41/DiplomaticQuarter.ipa deleted file mode 100644 index ca720a76..00000000 Binary files a/Runner 2021-01-01 21-59-41/DiplomaticQuarter.ipa and /dev/null differ diff --git a/assets/images/new/body/abdomin.svg b/assets/images/new/body/abdomin.svg deleted file mode 100644 index c28cd70b..00000000 --- a/assets/images/new/body/abdomin.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/assets/images/new/body/chest.svg b/assets/images/new/body/chest.svg deleted file mode 100644 index 77f603cb..00000000 --- a/assets/images/new/body/chest.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/assets/images/new/body/head.svg b/assets/images/new/body/head.svg deleted file mode 100644 index 5ec9c3f3..00000000 --- a/assets/images/new/body/head.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/left_ankle.svg b/assets/images/new/body/left_ankle.svg deleted file mode 100644 index e7bf8080..00000000 --- a/assets/images/new/body/left_ankle.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/left_arm.svg b/assets/images/new/body/left_arm.svg deleted file mode 100644 index 6445b6be..00000000 --- a/assets/images/new/body/left_arm.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/assets/images/new/body/left_ear.svg b/assets/images/new/body/left_ear.svg deleted file mode 100644 index 402f5f20..00000000 --- a/assets/images/new/body/left_ear.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/assets/images/new/body/left_elbow.svg b/assets/images/new/body/left_elbow.svg deleted file mode 100644 index 9e741679..00000000 --- a/assets/images/new/body/left_elbow.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/left_eye.svg b/assets/images/new/body/left_eye.svg deleted file mode 100644 index add3c780..00000000 --- a/assets/images/new/body/left_eye.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/left_foot.svg b/assets/images/new/body/left_foot.svg deleted file mode 100644 index c3f8de42..00000000 --- a/assets/images/new/body/left_foot.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/left_forearm.svg b/assets/images/new/body/left_forearm.svg deleted file mode 100644 index 7a8224b6..00000000 --- a/assets/images/new/body/left_forearm.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/left_hand.svg b/assets/images/new/body/left_hand.svg deleted file mode 100644 index 168d05c4..00000000 --- a/assets/images/new/body/left_hand.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/left_knee.svg b/assets/images/new/body/left_knee.svg deleted file mode 100644 index 5ff004f6..00000000 --- a/assets/images/new/body/left_knee.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/left_leg.svg b/assets/images/new/body/left_leg.svg deleted file mode 100644 index 352cf2b9..00000000 --- a/assets/images/new/body/left_leg.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/left_soulder.svg b/assets/images/new/body/left_soulder.svg deleted file mode 100644 index 8bd69c8c..00000000 --- a/assets/images/new/body/left_soulder.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/left_thigh.svg b/assets/images/new/body/left_thigh.svg deleted file mode 100644 index 880e1da2..00000000 --- a/assets/images/new/body/left_thigh.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/left_wrist.svg b/assets/images/new/body/left_wrist.svg deleted file mode 100644 index b99c3f1c..00000000 --- a/assets/images/new/body/left_wrist.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/mouth.svg b/assets/images/new/body/mouth.svg deleted file mode 100644 index 1dd7ca76..00000000 --- a/assets/images/new/body/mouth.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/assets/images/new/body/neck.svg b/assets/images/new/body/neck.svg deleted file mode 100644 index e3c0d951..00000000 --- a/assets/images/new/body/neck.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/assets/images/new/body/nose.svg b/assets/images/new/body/nose.svg deleted file mode 100644 index 1e08b591..00000000 --- a/assets/images/new/body/nose.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/assets/images/new/body/pelvis.svg b/assets/images/new/body/pelvis.svg deleted file mode 100644 index 77d32820..00000000 --- a/assets/images/new/body/pelvis.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/assets/images/new/body/publs.svg b/assets/images/new/body/publs.svg deleted file mode 100644 index 40909b35..00000000 --- a/assets/images/new/body/publs.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/right_ankle.svg b/assets/images/new/body/right_ankle.svg deleted file mode 100644 index 2eec1180..00000000 --- a/assets/images/new/body/right_ankle.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/right_arm.svg b/assets/images/new/body/right_arm.svg deleted file mode 100644 index 60a03321..00000000 --- a/assets/images/new/body/right_arm.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/right_ear.svg b/assets/images/new/body/right_ear.svg deleted file mode 100644 index 65de3b24..00000000 --- a/assets/images/new/body/right_ear.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/assets/images/new/body/right_elbow.svg b/assets/images/new/body/right_elbow.svg deleted file mode 100644 index 0a58f385..00000000 --- a/assets/images/new/body/right_elbow.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/right_eye.svg b/assets/images/new/body/right_eye.svg deleted file mode 100644 index 4642c353..00000000 --- a/assets/images/new/body/right_eye.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/assets/images/new/body/right_foot.svg b/assets/images/new/body/right_foot.svg deleted file mode 100644 index 5faa7b58..00000000 --- a/assets/images/new/body/right_foot.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/right_forearm.svg b/assets/images/new/body/right_forearm.svg deleted file mode 100644 index fea91ddf..00000000 --- a/assets/images/new/body/right_forearm.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/right_hand.svg b/assets/images/new/body/right_hand.svg deleted file mode 100644 index b36dd80c..00000000 --- a/assets/images/new/body/right_hand.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/right_knee.svg b/assets/images/new/body/right_knee.svg deleted file mode 100644 index 16a174cf..00000000 --- a/assets/images/new/body/right_knee.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/right_leg.svg b/assets/images/new/body/right_leg.svg deleted file mode 100644 index 2cd6a760..00000000 --- a/assets/images/new/body/right_leg.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/right_soulder.svg b/assets/images/new/body/right_soulder.svg deleted file mode 100644 index cb29dc98..00000000 --- a/assets/images/new/body/right_soulder.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/assets/images/new/body/right_thigh.svg b/assets/images/new/body/right_thigh.svg deleted file mode 100644 index 8d9ef522..00000000 --- a/assets/images/new/body/right_thigh.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/new/body/right_wrist.svg b/assets/images/new/body/right_wrist.svg deleted file mode 100644 index d54c14c8..00000000 --- a/assets/images/new/body/right_wrist.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/lib/config/config.dart b/lib/config/config.dart index 4cbd2646..7aea6857 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -17,8 +17,8 @@ const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/'; -// const BASE_URL = 'https://uat.hmgwebservices.com/'; -const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs // const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index c7c37bb7..72c06137 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1612,4 +1612,5 @@ const Map localizedValues = { "viewDocList": {"en": "View List of Doctors", "ar": "عرض قائمة الأطباء"}, "bodyFatTitle": {"en": "Body Fat", "ar": " الدهون في الجسم"}, "cholesTitle": {"en": "Blood Cholesterol", "ar": " الكولسترول في الدم"}, + "laserClinic": {"en": "Laser Clinic", "ar": "عيادة الليزر"}, }; diff --git a/lib/core/model/feedback/COC_items.dart b/lib/core/model/feedback/COC_items.dart index 2748ca50..4139fc59 100644 --- a/lib/core/model/feedback/COC_items.dart +++ b/lib/core/model/feedback/COC_items.dart @@ -26,6 +26,7 @@ class COCItem { String status; String statusAr; dynamic statusEn; + int statusId; COCItem({ this.appointment, @@ -55,6 +56,7 @@ class COCItem { this.status, this.statusAr, this.statusEn, + this.statusId, }); COCItem.fromJson(Map json) { @@ -85,6 +87,7 @@ class COCItem { status = json['Status']; statusAr = json['StatusAr']; statusEn = json['StatusEn']; + statusId = json['StatusId']; } Map toJson() { diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart index ac4c11e1..37bc5fe6 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart @@ -223,8 +223,6 @@ class _AllHabibMedicalSevicePage2State extends State var data = await this.sharedPref.getObject(WEATHER); if (data == null) { var d = await _weatherService.getWeatherData(); - - print(d); weatherNum = d.temperature; setState(() { weather = d != null ? d.temperature.toString() + '\u2103' : '--'; diff --git a/lib/pages/AlHabibMedicalService/h2o/h2o_index_page.dart b/lib/pages/AlHabibMedicalService/h2o/h2o_index_page.dart index e6e05ee6..df8d3cc8 100644 --- a/lib/pages/AlHabibMedicalService/h2o/h2o_index_page.dart +++ b/lib/pages/AlHabibMedicalService/h2o/h2o_index_page.dart @@ -6,7 +6,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; class H2OPageIndexPage extends StatelessWidget { @override @@ -23,7 +22,7 @@ class H2OPageIndexPage extends StatelessWidget { "Water Tracker:", fontWeight: FontWeight.normal, fontSize: 25, - color: HexColor("#60686b"), + color: Color(0xFF60686b), ), SizedBox( height: 12, diff --git a/lib/pages/AlHabibMedicalService/h2o/month_page.dart b/lib/pages/AlHabibMedicalService/h2o/month_page.dart index daf91cb9..642f4826 100644 --- a/lib/pages/AlHabibMedicalService/h2o/month_page.dart +++ b/lib/pages/AlHabibMedicalService/h2o/month_page.dart @@ -3,8 +3,6 @@ import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_v import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/charts/app_bar_chart.dart'; -import 'package:diplomaticquarterapp/widgets/errors/app_embedded_error.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/pages/AlHabibMedicalService/h2o/today_page.dart b/lib/pages/AlHabibMedicalService/h2o/today_page.dart index accd6887..984d0680 100644 --- a/lib/pages/AlHabibMedicalService/h2o/today_page.dart +++ b/lib/pages/AlHabibMedicalService/h2o/today_page.dart @@ -11,8 +11,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:hexcolor/hexcolor.dart'; -import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:wave/config.dart'; import 'package:wave/wave.dart'; diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart index 8fb12f33..e0c6bfe7 100644 --- a/lib/pages/Blood/blood_donation.dart +++ b/lib/pages/Blood/blood_donation.dart @@ -2,8 +2,6 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; - -//import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; @@ -20,10 +18,10 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/show_zoom_image_dialog.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:giffy_dialog/giffy_dialog.dart'; import 'package:provider/provider.dart'; enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } @@ -74,14 +72,38 @@ class _BloodDonationPageState extends State { super.initState(); } + int getSelectedCityID(MyBalanceViewModel model) { + int cityID = 1; + + model.CitiesModelList.forEach((element) { + if (element.description == model.bloodModelList[0].city) { + cityID = element.iD; + } + }); + + return cityID; + } + @override Widget build(BuildContext context) { projectProvider = Provider.of(context); return BaseView( onModelReady: (model) { - model.getCities(); - model.getBlood(); + model.getCities().then((value) { + model.getBlood().then((value) { + if (model.bloodModelList.length > 0) { + CitiesModel citiesModel = new CitiesModel(); + citiesModel.iD = getSelectedCityID(model); + _selectedHospitalIndex = (citiesModel.iD - 1); + citiesModel.description = model.CitiesModelList[_selectedHospitalIndex].description; + citiesModel.descriptionN = model.CitiesModelList[_selectedHospitalIndex].descriptionN; + _selectedHospital = citiesModel; + } else { + _selectedHospital = model.CitiesModelList[0]; + } + }); + }); }, builder: (_, model, w) => AppScaffold( isShowAppBar: true, @@ -89,6 +111,7 @@ class _BloodDonationPageState extends State { backgroundColor: Color(0xffF7F7F7), showNewAppBarTitle: true, baseViewModel: model, + isShowDecPage: true, imagesInfo: imagesInfo, description: TranslationBase.of(context).bloodDonationInfo, appBarTitle: TranslationBase.of(context).bloodD, @@ -106,31 +129,32 @@ class _BloodDonationPageState extends State { style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), ), SizedBox(height: 12), - CommonDropDownView( - TranslationBase.of(context).city, - model.bloodModelList.isNotEmpty - ? model.bloodModelList[0].city - : projectProvider.isArabic - ? model.CitiesModelList[_selectedHospitalIndex].descriptionN - : model.CitiesModelList[_selectedHospitalIndex].description, () { - List list = [ - for (int i = 0; i < model.CitiesModelList.length; i++) - RadioSelectionDialogModel(projectProvider.isArabic ? model.CitiesModelList[i].descriptionN : model.CitiesModelList[i].description, i), - ]; + if (projectProvider.isLogin && model.state != ViewState.Busy) + CommonDropDownView( + TranslationBase.of(context).city, + // (model.bloodModelList.isNotEmpty && model.CitiesModelList.isNotEmpty) + // ? model.bloodModelList[0].city + // : + projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description, () { + List list = [ + for (int i = 0; i < model.CitiesModelList.length; i++) + RadioSelectionDialogModel(projectProvider.isArabic ? model.CitiesModelList[i].descriptionN : model.CitiesModelList[i].description, i), + ]; - showDialog( - context: context, - child: RadioSelectionDialog( - listData: list, - selectedIndex: _selectedHospitalIndex, - isScrollable: true, - onValueSelected: (index) { - _selectedHospitalIndex = index; - _selectedHospital = model.CitiesModelList[index]; - }, - ), - ); - }).withBorderedContainer, + showDialog( + context: context, + child: RadioSelectionDialog( + listData: list, + selectedIndex: _selectedHospitalIndex, + isScrollable: true, + onValueSelected: (index) { + _selectedHospitalIndex = index; + _selectedHospital = model.CitiesModelList[index]; + setState(() {}); + }, + ), + ); + }).withBorderedContainer, SizedBox(height: 12), CommonDropDownView(TranslationBase.of(context).gender, _selectedGenderIndex == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female, () { List list = [ @@ -226,19 +250,7 @@ class _BloodDonationPageState extends State { width: 350, child: InkWell( onTap: () { - showDialog( - context: context, - builder: (_) => AssetGiffyDialog( - title: Text( - "", - style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600), - ), - image: Image.asset('assets/images/BloodChrt_EN.png'), - buttonCancelText: Text(TranslationBase.of(context).cancel), - buttonCancelColor: Colors.grey, - onlyCancelButton: true, - ), - ); + showZoomImageDialog(context, 'assets/images/BloodChrt_EN.png', isNetworkImage: false); }, child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png'), color: Colors.white), ), @@ -261,7 +273,7 @@ class _BloodDonationPageState extends State { AppToast.showErrorToast(message: TranslationBase.of(context).selectCity); return; } - bloodDetails.city = projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description; + bloodDetails.city = _selectedHospital.description; bloodDetails.cityCode = _selectedHospital.iD.toString(); bloodDetails.gender = _selectedGenderIndex; bloodDetails.bloodGroup = getBlood(_selectedBloodTypeIndex); diff --git a/lib/pages/BookAppointment/LaserBooking.dart b/lib/pages/BookAppointment/LaserBooking.dart index f1acaf2c..942e5e18 100644 --- a/lib/pages/BookAppointment/LaserBooking.dart +++ b/lib/pages/BookAppointment/LaserBooking.dart @@ -1,6 +1,6 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; class LaserBooking extends StatefulWidget { @override @@ -10,118 +10,6 @@ class LaserBooking extends StatefulWidget { class _LaserBookingState extends State { @override Widget build(BuildContext context) { - return AppScaffold( - isShowDecPage: false, - isShowAppBar: true, - showNewAppBarTitle: true, - showNewAppBar: true, - appBarTitle: "Laser", - body: Container( - child: Column( - children: [ - HumanAnatomy(), - ], - ), - )); - } -} - -class HumanAnatomy extends StatefulWidget { - final ValueChanged onChanged; - - const HumanAnatomy({Key key, this.onChanged}) : super(key: key); - - @override - _HumanAnatomyState createState() => new _HumanAnatomyState(); -} - -class _HumanAnatomyState extends State { - var _bodyPartList = []; - - @override - void initState() { - super.initState(); - if (mounted) { - _publishSelection(_bodyPartList); - } - } - - @override - Widget build(BuildContext context) { - return humanAnatomy(); - } - - Widget humanAnatomy() { - return Container( - width: 320.0, - height: 560.0, - child: SizedBox( - child: Stack( - children: [ - bodyPart("assets/images/new/body/head.svg", "Head", 0.0, 0.0, 0.0, 70.0), - bodyPart("assets/images/new/body/left_ear.svg", "leftEar", 32.0, 50.0, 0.0, 20.0), - bodyPart("assets/images/new/body/right_ear.svg", "rightEar", 32.0, 0.0, 50.0, 20.0), - bodyPart("assets/images/new/body/left_eye.svg", "LeftEye", 22.0, 20.0, 0.0, 10.0), - bodyPart("assets/images/new/body/right_eye.svg", "rightEye", 22.0, 0.0, 20.0, 10.0), - bodyPart("assets/images/new/body/nose.svg", "Nose", 25.0, 0.0, 0.0, 20.0), - bodyPart("assets/images/new/body/mouth.svg", "Mouth", 48.0, 0.0, 0.0, 10.0), - bodyPart("assets/images/new/body/neck.svg", "Neck", 58.0, 0.0, 0.0, 40.0), - bodyPart("assets/images/new/body/chest.svg", "Chest", 93.0, 0.0, 0.0, 95.0), - bodyPart("assets/images/new/body/abdomin.svg", "Abdomin", 175.0, 0.0, 0.0, 65.0), - bodyPart("assets/images/new/body/pelvis.svg", "Pelvis", 225.0, 0.0, 0.0, 50.0), - bodyPart("assets/images/new/body/publs.svg", "Publs", 275.0, 0.0, 0.0, 15.0), - bodyPart("assets/images/new/body/left_soulder.svg", "leftSoulder", 90.0, 105.0, 0.0, 50.0), - bodyPart("assets/images/new/body/right_soulder.svg", "rightSoulder", 89.0, 0.0, 110.0, 50.0), - bodyPart("assets/images/new/body/left_arm.svg", "leftArm", 120.0, 145.0, 0.0, 70.0), - bodyPart("assets/images/new/body/right_arm.svg", "rightArm", 118.0, 0.0, 142.0, 70.0), - bodyPart("assets/images/new/body/left_elbow.svg", "leftElbow", 172.0, 172.0, 0.0, 39.0), - bodyPart("assets/images/new/body/right_elbow.svg", "rightElbow", 170.0, 0.0, 170.0, 40.0), - bodyPart("assets/images/new/body/left_forearm.svg", "leftForearm", 195.0, 190.0, 0.0, 54.0), - bodyPart("assets/images/new/body/right_forearm.svg", "rightForearm", 195.0, 0.0, 190.0, 54.0), - bodyPart("assets/images/new/body/left_wrist.svg", "leftWrist", 238.0, 220.0, 0.0, 23.0), - bodyPart("assets/images/new/body/right_wrist.svg", "rightWrist", 238.0, 0.0, 220.0, 23.0), - bodyPart("assets/images/new/body/left_hand.svg", "leftHand", 250.0, 250.0, 0.0, 60.0), - bodyPart("assets/images/new/body/right_hand.svg", "rightHand", 250.0, 0.0, 250.0, 60.0), - bodyPart("assets/images/new/body/left_thigh.svg", "leftThigh", 242.0, 63.0, 0.0, 138.0), - bodyPart("assets/images/new/body/right_thigh.svg", "rightThigh", 242.0, 0.0, 63.0, 138.0), - bodyPart("assets/images/new/body/left_knee.svg", "leftKnee", 360.0, 68.0, 0.0, 48.0), - bodyPart("assets/images/new/body/right_knee.svg", "rightKnee", 360.0, 0.0, 68.0, 48.0), - bodyPart("assets/images/new/body/left_leg.svg", "leftLeg", 395.0, 64.0, 0.0, 105.0), - bodyPart("assets/images/new/body/right_leg.svg", "rightLeg", 393.0, 0.0, 65.0, 106.0), - bodyPart("assets/images/new/body/left_ankle.svg", "leftAnkle", 495.0, 64.0, 0.0, 25.0), - bodyPart("assets/images/new/body/right_ankle.svg", "rightAnkle", 493.0, 0.0, 68.0, 25.0), - bodyPart("assets/images/new/body/left_foot.svg", "leftFoot", 510.0, 80.0, 0.0, 60.0), - bodyPart("assets/images/new/body/right_foot.svg", "rightFoot", 508.0, 0.0, 83.0, 56.0), - ], - ), - ), - ); - } - - Widget bodyPart(String svgPath, String svgName, double marginTop, double marginRight, double marginLeft, double height) { - Color _svgColor = _bodyPartList.contains(svgName) ? Colors.redAccent : null; - final Widget bodyPartSvg = new SvgPicture.asset(svgPath, semanticsLabel: svgName, color: _svgColor); - return Container( - margin: EdgeInsets.only(top: marginTop, right: marginRight, left: marginLeft), - height: height, - alignment: Alignment.topCenter, - child: GestureDetector( - onTap: () { - setState(() { - if (_bodyPartList.contains(svgName)) { - _bodyPartList.remove(svgName); - } else { - _bodyPartList.add(svgName); - } - }); - }, - child: bodyPartSvg), - ); - } - - void _publishSelection(List _bodyPartList) { - if (widget.onChanged != null) { - widget.onChanged(_bodyPartList); - } + return AppScaffold(isShowDecPage: false, isShowAppBar: true, showNewAppBarTitle: true, showNewAppBar: true, appBarTitle: TranslationBase.of(context).laserClinic, body: Container()); } } diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 63e84e96..9c28310e 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -539,8 +539,8 @@ class _SearchByClinicState extends State { navigateToDentalComplaints(context, searchInfo); } else if (dropdownValue.split("-")[0] == "253") { - // navigateToLaserClinic(context); - callDoctorsSearchAPI(); + navigateToLaserClinic(context); + // callDoctorsSearchAPI(); } else if (dropdownValue.split("-")[1] == "true" // && authProvider.isLogin && // authUser.patientType == 1 diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart index 87516e52..106ecb0d 100644 --- a/lib/pages/ContactUs/findus/hospitrals_page.dart +++ b/lib/pages/ContactUs/findus/hospitrals_page.dart @@ -1,10 +1,7 @@ import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/hospital_location.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:giffy_dialog/giffy_dialog.dart'; -import 'package:maps_launcher/maps_launcher.dart'; import 'package:url_launcher/url_launcher.dart'; class HospitalsPage extends StatefulWidget { diff --git a/lib/pages/ErService/NearestEr.dart b/lib/pages/ErService/NearestEr.dart index 845a8fe7..3aad729f 100644 --- a/lib/pages/ErService/NearestEr.dart +++ b/lib/pages/ErService/NearestEr.dart @@ -10,7 +10,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import '../../uitl/translations_delegate_base.dart'; -import 'widgets/card_position.dart'; class NearestEr extends StatefulWidget { static const String _url = "assets/images/"; diff --git a/lib/pages/ErService/widgets/card_common.dart b/lib/pages/ErService/widgets/card_common.dart deleted file mode 100644 index 409fdf21..00000000 --- a/lib/pages/ErService/widgets/card_common.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'package:flutter/material.dart'; - -class CardCommonEr extends StatelessWidget { - final image; - final text; - final subText; - final bool locked; - - final Function onTap; - const CardCommonEr({ - this.locked = false, - @required this.image, - @required this.text, - @required this.subText, - @required this.onTap, - }); - - @override - Widget build(BuildContext context) { - return GestureDetector( - onTap: locked ? null : onTap, - child: Opacity( - opacity: locked ? 0.25 : 1.0, - child: Stack( - children: [ - Container( - width: double.infinity, - padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(15), - color: Colors.white, - border: Border.all( - color: Color(0xffefefef), - width: 1, - ), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Image.asset(this.image, width: 42.0, height: 42.0), - Text( - text + "${subText.isEmpty ? "" : "\n$subText"}", - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16), - ), - ], - ), - ), - if (locked) Align(alignment: Alignment.center, child: lock()) - ], - ), - ), - ); - } - - Widget lock() { - return Container( - child: Icon(Icons.lock_rounded, size: 80), - ); - } -} diff --git a/lib/pages/ErService/widgets/card_position.dart b/lib/pages/ErService/widgets/card_position.dart deleted file mode 100644 index fc0ca9e4..00000000 --- a/lib/pages/ErService/widgets/card_position.dart +++ /dev/null @@ -1,106 +0,0 @@ -//import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; -import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:flutter/material.dart'; -import 'package:giffy_dialog/giffy_dialog.dart'; -import 'package:maps_launcher/maps_launcher.dart'; -import 'package:url_launcher/url_launcher.dart'; - -class CardPosition extends StatelessWidget { - final image; - final text; - final subText; - final type; - final telephone; - final networkImage; - final latitude; - final longitude; - final projectname; - final cardSize; - final String waitingTime; - - const CardPosition({ - @required this.image, - @required this.text, - @required this.subText, - @required this.type, - @required this.telephone, - @required this.networkImage, - @required this.latitude, - @required this.longitude, - @required this.projectname, - @required this.cardSize, - @required this.waitingTime, - }); - - @override - Widget build(BuildContext context) { - return GestureDetector( - onTap: () { - navigateToSearch(context, this.type, this.telephone, this.networkImage, this.latitude, this.longitude, this.projectname); - }, - child: Container( - // width:MediaQuery.of(context).size.width * 0.47,//165, - margin: EdgeInsets.fromLTRB(8.0, 8.0, 8.0, 8.0), - decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)], borderRadius: BorderRadius.circular(10), color: Colors.white), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - height: cardSize * 0.2 - 8, - margin: EdgeInsets.fromLTRB(8.0, 8.0, 8.0, 0.0), - child: Text(this.text, overflow: TextOverflow.clip, style: TextStyle(color: Colors.black, letterSpacing: 1.0, fontSize: 2 * SizeConfig.textMultiplier)), - ), - Container( - height: cardSize * 0.5 - 8, - alignment: Alignment.center, - margin: EdgeInsets.fromLTRB(0.0, 0.0, 8.0, 8.0), - child: Image.asset(this.image, width: 60.0, height: cardSize * 0.4), - ), - Container( - margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0), - height: cardSize * 0.2 - 8, - child: Text(this.subText, overflow: TextOverflow.clip, style: TextStyle(color: Color(0xFFc5272d), letterSpacing: 1.0, fontSize: 15.0)), - ), - ], - ), - ), - ); - } - - Future navigateToSearch(context, type, telephone, networkImage, latitude, longitude, projectname) async { - var localize = TranslationBase.of(context); - showDialog( - context: context, - builder: (_) => AssetGiffyDialog( - entryAnimation: EntryAnimation.BOTTOM, - image: Image.network( - networkImage, - fit: BoxFit.cover, - ), - title: Text( - projectname, - style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600), - ), - description: Text( - "${localize.averageWaitingTime}\n\n$waitingTime ${localize.minute}", - textAlign: TextAlign.center, - ), - buttonOkText: Text( - "LOCATION", - style: TextStyle(color: Colors.white), - ), - buttonOkColor: Colors.grey, - buttonCancelText: Text( - 'CAll', - style: TextStyle(color: Colors.white), - ), - buttonCancelColor: Colors.grey, - onOkButtonPressed: () { - MapsLauncher.launchCoordinates(double.parse(latitude), double.parse(longitude), projectname); - }, - onCancelButtonPressed: () { - launch("tel://" + telephone); - })); - } -} diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index 224f3db8..acfe444f 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -408,6 +408,7 @@ class _AppointmentActionsState extends State { prescriptions.actualDoctorRate = widget.appo.actualDoctorRate; prescriptions.noOfPatientsRate = widget.appo.noOfPatientsRate; prescriptions.isInOutPatient = widget.appo.isInOutPatient; + prescriptions.doctorID = widget.appo.doctorID; navigateToMedicinePrescriptionReport(prescriptions); } diff --git a/lib/pages/feedback/status_feedback_page.dart b/lib/pages/feedback/status_feedback_page.dart index 5040b200..15e3e3dd 100644 --- a/lib/pages/feedback/status_feedback_page.dart +++ b/lib/pages/feedback/status_feedback_page.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_mode import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback-detail.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; @@ -28,10 +29,10 @@ class _StatusFeedbackPageState extends State { TextEditingController complainNumberController = TextEditingController(); StatusType statusType = StatusType.ComplaintNumber; int selectedStatusIndex = 3; - + ProjectViewModel projectViewModel; @override Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); + projectViewModel = Provider.of(context); return BaseView( allowAny: true, onModelReady: (model) { @@ -202,38 +203,67 @@ class _StatusFeedbackPageState extends State { shrinkWrap: isLogin ? false : true, physics: isLogin ? null : NeverScrollableScrollPhysics(), itemBuilder: (context, index) => InkWell( - onTap: () {}, + onTap: () { + // sss + }, child: Container( - decoration: cardRadius(12), - margin: EdgeInsets.all(10), - child: Padding( - padding: const EdgeInsets.all(12.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(isArabic ? cOCItemList[index].statusAr : cOCItemList[index].status, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)), - Container( - margin: EdgeInsets.only(top: 5.0), - child: Text(cOCItemList[index].formType.toString(), - style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12))), - MyRichText(TranslationBase.of(context).number + ": ", cOCItemList[index].itemID.toString(), isArabic), - Text(cOCItemList[index].cOCTitle, - style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)), - ], - ), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Text(cOCItemList[index].date.split(" ")[0], - style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)), - Text(cOCItemList[index].date.split(" ")[1].substring(0, 4), - style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)), - ], - ), - ], + margin: EdgeInsets.only(top: 12), + decoration: BoxDecoration( + color: (cOCItemList[index].statusId==7||cOCItemList[index].statusId==8)?CustomColors.accentColor:(cOCItemList[index].statusId==10||cOCItemList[index].statusId==6||cOCItemList[index].statusId==9)?CustomColors.green:CustomColors.orange, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + + child: Container( + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), + padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(isArabic ? cOCItemList[index].statusAr : cOCItemList[index].status, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)), + Container( + margin: EdgeInsets.only(top: 5.0), + child: Text(cOCItemList[index].formType.toString(), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12))), + MyRichText(TranslationBase.of(context).number + ": ", cOCItemList[index].itemID.toString(), isArabic), + Text(cOCItemList[index].cOCTitle, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text(cOCItemList[index].date.split(" ")[0], + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)), + Text(cOCItemList[index].date.split(" ")[1].substring(0, 4), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)), + ], + ), + ], + ), ), ), ), diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 0882f361..f3af7c74 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -23,7 +23,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; import 'landing_page_pharmcy.dart'; @@ -196,7 +195,7 @@ class _HomePageState extends State { width: double.infinity, height: 125, decoration: BoxDecoration( - color: HexColor('#A59E9E'), + color: Color(0xFFA59E9E), shape: BoxShape.rectangle, border: Border.all(color: Colors.transparent, width: 0.5), borderRadius: BorderRadius.all(Radius.circular(9)), @@ -231,7 +230,7 @@ class _HomePageState extends State { width: 90, height: 30, decoration: BoxDecoration( - color: HexColor('#D81A2E'), + color: Color(0xFFD81A2E), shape: BoxShape.rectangle, border: Border.all(color: Colors.transparent, width: 0.5), borderRadius: BorderRadius.all(Radius.circular(0)), @@ -255,7 +254,7 @@ class _HomePageState extends State { width: double.infinity, height: projectViewModel.isArabic ? 160 : 130, decoration: BoxDecoration( - color: HexColor('#A59E9E'), + color: Color(0xFFA59E9E), shape: BoxShape.rectangle, border: Border.all(color: Colors.transparent, width: 0.5), borderRadius: BorderRadius.all(Radius.circular(9)), @@ -341,7 +340,7 @@ class _HomePageState extends State { width: 90, height: 30, decoration: BoxDecoration( - color: HexColor('#D81A2E'), + color: Color(0xFFD81A2E), shape: BoxShape.rectangle, border: Border.all(color: Colors.transparent, width: 0.5), borderRadius: BorderRadius.all( @@ -593,7 +592,7 @@ class _HomePageState extends State { )), ), height: MediaQuery.of(context).size.width * 0.4, - color: HexColor("#747C80"), + color: Color(0xFF747C80), imageName: 'emergency_service_image.png', ), ], @@ -826,7 +825,6 @@ class _HomePageState extends State { } else { GifLoaderDialogUtils.showMyDialog(context); await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { - await pharmacyModuleViewModel.verifyCustomer().then((value) { GifLoaderDialogUtils.hideDialog(context); Navigator.push(context, FadePage(page: LandingPagePharmacy())); @@ -868,7 +866,7 @@ class DashboardItem extends StatelessWidget { color: !hasBorder ? color != null ? color - : HexColor('#050705').withOpacity(opacity) + : Color(0xFF050705).withOpacity(opacity) : Colors.white, borderRadius: BorderRadius.circular(6.0), border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent), diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 7f4d8621..cb26c8b7 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -29,7 +29,6 @@ import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart'; import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart'; -import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart'; @@ -242,15 +241,14 @@ class _LandingPageState extends State with WidgetsBindingObserver { pageController = PageController(keepPage: true); _firebaseMessaging.setAutoInitEnabled(true); - // signalRUtil = new SignalRUtil(hubName: "http://192.168.8.101:5001/chatHub", context: context); - // signalRUtil = new SignalRUtil(hubName: "https://api.cssynapses.com/chatsocket", context: context); + signalRUtil = new SignalRUtil(hubName: "https://VCallApi.hmg.com/WebRTCHub?source=mobile&username=2001273", context: context); locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context); WidgetsBinding.instance.addPostFrameCallback((_) { if (projectViewModel.isLogin && !projectViewModel.isLoginChild) { familyFileProvider.getSharedRecordByStatus(); } - // signalRUtil.startSignalRConnection(); + if (!signalRUtil.getConnectionState()) signalRUtil.startSignalRConnection(); }); // HMG (Guest/Internet) Wifi Access [Zohaib Kambrani] //for now commented to reduce this call will enable it when needed @@ -507,91 +505,93 @@ class _LandingPageState extends State with WidgetsBindingObserver { model = Provider.of(context); // currentTab == 0 ? 45 : 0.0 return Scaffold( - appBar: currentTab == 0 ? PreferredSize( - preferredSize: Size.fromHeight(currentTab == 0 ? 45 : 0.0), - child: AppBar( - elevation: 0, - backgroundColor: CustomColors.backgroudGreyColor, - textTheme: TextTheme( - headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold), - ), - title: Text( - getText(currentTab).toUpperCase(), - style: TextStyle( - fontWeight: FontWeight.bold, - color: currentTab == 0 ? CustomColors.backgroudGreyColor : Theme.of(context).textTheme.headline1.color, - fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), - // bold: true, - ), - leading: Builder( - builder: (BuildContext context) { - return new Stack( - children: [ - currentTab == 0 - ? IconButton( - icon: SvgPicture.asset("assets/images/new/menu.svg"), - color: Theme.of(context).textTheme.headline1.color, - onPressed: () => Scaffold.of(context).openDrawer(), - ) - : IconButton( - icon: Icon(Icons.arrow_back), - onPressed: () { - setState(() { - currentTab = 0; - }); - - pageController.jumpToPage(0); - }, - ), - projectViewModel.isLogin && model.notificationsCount != null && !projectViewModel.isLoginChild - ? new Positioned( - right: projectViewModel.isArabic ? 35 : 0, - top: 5, - child: new Container( - padding: EdgeInsets.all(4), - decoration: new BoxDecoration( - color: CustomColors.accentColor, - borderRadius: BorderRadius.circular(20), - ), - constraints: BoxConstraints( - minWidth: 20, - minHeight: 20, - ), - child: new Text( - model.notificationsCount.toString(), - style: new TextStyle( - color: Colors.white, - fontSize: projectViewModel.isArabic ? 8 : 9, + appBar: currentTab == 0 + ? PreferredSize( + preferredSize: Size.fromHeight(currentTab == 0 ? 45 : 0.0), + child: AppBar( + elevation: 0, + backgroundColor: CustomColors.backgroudGreyColor, + textTheme: TextTheme( + headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold), + ), + title: Text( + getText(currentTab).toUpperCase(), + style: TextStyle( + fontWeight: FontWeight.bold, + color: currentTab == 0 ? CustomColors.backgroudGreyColor : Theme.of(context).textTheme.headline1.color, + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + // bold: true, + ), + leading: Builder( + builder: (BuildContext context) { + return new Stack( + children: [ + currentTab == 0 + ? IconButton( + icon: SvgPicture.asset("assets/images/new/menu.svg"), + color: Theme.of(context).textTheme.headline1.color, + onPressed: () => Scaffold.of(context).openDrawer(), + ) + : IconButton( + icon: Icon(Icons.arrow_back), + onPressed: () { + setState(() { + currentTab = 0; + }); + + pageController.jumpToPage(0); + }, ), - textAlign: TextAlign.center, - ), - ), - ) - : SizedBox() + projectViewModel.isLogin && model.notificationsCount != null && !projectViewModel.isLoginChild + ? new Positioned( + right: projectViewModel.isArabic ? 35 : 0, + top: 5, + child: new Container( + padding: EdgeInsets.all(4), + decoration: new BoxDecoration( + color: CustomColors.accentColor, + borderRadius: BorderRadius.circular(20), + ), + constraints: BoxConstraints( + minWidth: 20, + minHeight: 20, + ), + child: new Text( + model.notificationsCount.toString(), + style: new TextStyle( + color: Colors.white, + fontSize: projectViewModel.isArabic ? 8 : 9, + ), + textAlign: TextAlign.center, + ), + ), + ) + : SizedBox() + ], + ); + }, + ), + actions: [ + // IconButton( + // //iconSize: 70, + // icon: Icon( + // projectViewModel.isLogin ? Icons.settings : Icons.login, + // color: Theme.of(context).textTheme.headline1.color, + // ), + // onPressed: () { + // if (projectViewModel.isLogin) + // Navigator.of(context).pushNamed( + // SETTINGS, + // ); + // else + // login(); + // }, //do something, + // ) ], - ); - }, - ), - actions: [ - // IconButton( - // //iconSize: 70, - // icon: Icon( - // projectViewModel.isLogin ? Icons.settings : Icons.login, - // color: Theme.of(context).textTheme.headline1.color, - // ), - // onPressed: () { - // if (projectViewModel.isLogin) - // Navigator.of(context).pushNamed( - // SETTINGS, - // ); - // else - // login(); - // }, //do something, - // ) - ], - centerTitle: true, - ), - ) : null, + centerTitle: true, + ), + ) + : null, drawer: SafeArea(child: AppDrawer()), extendBody: false, body: WillPopScope( diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart index 5cf76e4f..540174c7 100644 --- a/lib/pages/login/register.dart +++ b/lib/pages/login/register.dart @@ -20,11 +20,12 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:intl/intl.dart' as intl; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; +import 'package:intl/intl.dart' as intl; class Register extends StatefulWidget { final Function changePageViewIndex; + const Register({Key key, this.changePageViewIndex}) : super(key: key); @override @@ -327,8 +328,7 @@ class _Register extends State { var nRequest = request.toJson(); nRequest['LogInTokenID'] = response['LogInTokenID']; if (response['hasFile'] == true) { - // AppToast.showErrorToast(message: response['ErrorEndUserMessage']); - AlertDialogBox( + ConfirmDialog dialog = new ConfirmDialog( context: context, confirmMessage: response['ErrorEndUserMessage'], okText: TranslationBase.of(context).ok, diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart index 4611eed1..0e627a95 100644 --- a/lib/pages/medical/prescriptions/prescription_items_page.dart +++ b/lib/pages/medical/prescriptions/prescription_items_page.dart @@ -62,107 +62,135 @@ class PrescriptionItemsPage extends StatelessWidget { prescriptions.noOfPatientsRate, model.user.emailAddress, ), - isNeedToShowButton: projectViewModel.havePrivilege(13), + isNeedToShowButton: (model.prescriptionReportListINP.length > 0 || model.prescriptionReportEnhList.length > 0) ? projectViewModel.havePrivilege(13) : false, showConfirmMessageDialog: false, onTap: () { showConfirmMessage(context, model); }, ), if (!prescriptions.isInOutPatient) - ListView.separated( - itemBuilder: (context, index) { - return InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: PrescriptionDetailsPageINP( - prescriptionReport: model.prescriptionReportListINP[index], - ), - ), - ); - }, - child: Container( - width: double.infinity, - child: Container( - margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4), - decoration: cardRadius(12), - child: Padding( - padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12), - child: Row( - children: [ - Flexible( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - model.prescriptionReportListINP[index].itemDescription.isNotEmpty - ? model.prescriptionReportListINP[index].itemDescription - : model.prescriptionReportListINP[index].itemDescriptionN ?? '', - style: TextStyle( - fontSize: 16, - letterSpacing: -0.64, - fontWeight: FontWeight.w600, - ), - ), - mHeight(10), - Row( + model.prescriptionReportListINP.length > 0 + ? ListView.separated( + itemBuilder: (context, index) { + return InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: PrescriptionDetailsPageINP( + prescriptionReport: model.prescriptionReportListINP[index], + ), + ), + ); + }, + child: Container( + width: double.infinity, + child: Container( + margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4), + decoration: cardRadius(12), + child: Padding( + padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - InkWell( - child: Stack( - alignment: Alignment.center, - children: [ - Container( - child: Image.network( - model.prescriptionReportListINP[index].imageSRCUrl, - fit: BoxFit.cover, - width: 60, - height: 60, - ), - margin: EdgeInsets.zero, - clipBehavior: Clip.antiAlias, - decoration: cardRadius(2000), - ), - Container( - child: Icon(Icons.search,size: 18,color: Colors.white,), - padding: EdgeInsets.all(6), - decoration: containerRadius(Colors.black.withOpacity(0.3), 200), - ) - ], + Text( + model.prescriptionReportListINP[index].itemDescription.isNotEmpty + ? model.prescriptionReportListINP[index].itemDescription + : model.prescriptionReportListINP[index].itemDescriptionN ?? '', + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, ), - onTap: (){ - showZoomImageDialog(context, model.prescriptionReportListINP[index].imageSRCUrl,); - }, ), - mWidth(12), - Column( - crossAxisAlignment: CrossAxisAlignment.start, + mHeight(10), + Row( children: [ - Row( - children: [ - Text( - TranslationBase.of(context).route + ": ", - style: TextStyle( - color: Colors.grey, - fontSize: 10, - letterSpacing: -0.4, - fontWeight: FontWeight.w600, + InkWell( + child: Stack( + alignment: Alignment.center, + children: [ + Container( + child: Image.network( + model.prescriptionReportListINP[index].imageSRCUrl, + fit: BoxFit.cover, + width: 60, + height: 60, + ), + margin: EdgeInsets.zero, + clipBehavior: Clip.antiAlias, + decoration: cardRadius(2000), ), - ), - Text( - model.prescriptionReportListINP[index].route, - style: TextStyle( - fontSize: 12, - letterSpacing: -0.48, - fontWeight: FontWeight.w600, - ), - ), - ], + Container( + child: Icon( + Icons.search, + size: 18, + color: Colors.white, + ), + padding: EdgeInsets.all(6), + decoration: containerRadius(Colors.black.withOpacity(0.3), 200), + ) + ], + ), + onTap: () { + showZoomImageDialog( + context, + model.prescriptionReportListINP[index].imageSRCUrl, + ); + }, ), - Row( + mWidth(12), + Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ + Row( + children: [ + Text( + TranslationBase.of(context).route + ": ", + style: TextStyle( + color: Colors.grey, + fontSize: 10, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + Text( + model.prescriptionReportListINP[index].route, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).dailyDoses + ": ", + style: TextStyle( + color: Colors.grey, + fontSize: 10, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + Text( + model.prescriptionReportListINP[index].doseDailyQuantity.toString(), + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + mHeight(12), Text( - TranslationBase.of(context).dailyDoses + ": ", + model.prescriptionReportListINP[index].remarks, style: TextStyle( color: Colors.grey, fontSize: 10, @@ -170,184 +198,180 @@ class PrescriptionItemsPage extends StatelessWidget { fontWeight: FontWeight.w600, ), ), - Text( - model.prescriptionReportListINP[index].doseDailyQuantity.toString(), - style: TextStyle( - fontSize: 12, - letterSpacing: -0.48, - fontWeight: FontWeight.w600, - ), - ), ], - ), - mHeight(12), - Text( - model.prescriptionReportListINP[index].remarks, - style: TextStyle( - color: Colors.grey, - fontSize: 10, - letterSpacing: -0.4, - fontWeight: FontWeight.w600, - ), - ), + ) ], - ) + ), ], ), - ], - ), - ), - Icon( - Icons.arrow_forward, - size: 16, + ), + Icon( + Icons.arrow_forward, + size: 16, + ), + ], ), - ], - ), - ), - ), - ), - ); - }, - separatorBuilder: (context, index) { - return mHeight(8); - }, - physics: NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: model.prescriptionReportListINP.length) - else - ListView.separated( - padding: EdgeInsets.all(21), - itemBuilder: (context, index) { - return InkWell( - onTap: () { - PrescriptionReport prescriptionReport = PrescriptionReport( - imageSRCUrl: model.prescriptionReportEnhList[index].imageSRCUrl, - itemDescription: model.prescriptionReportEnhList[index].itemDescription, - itemDescriptionN: model.prescriptionReportEnhList[index].itemDescription, - routeN: model.prescriptionReportEnhList[index].route, - frequency: model.prescriptionReportEnhList[index].frequency, - frequencyN: model.prescriptionReportEnhList[index].frequency, - doseDailyQuantity: model.prescriptionReportEnhList[index].doseDailyQuantity, - days: model.prescriptionReportEnhList[index].days, - itemID: model.prescriptionReportEnhList[index].itemID, - remarks: model.prescriptionReportEnhList[index].remarks); - Navigator.push( - context, - FadePage( - page: PrescriptionDetailsPage( - prescriptionReport: prescriptionReport, - prescriptions: prescriptions, + ), ), ), ); }, - child: Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(10.0), - ), - boxShadow: [ - BoxShadow( - color: Color(0xff000000).withOpacity(.05), - blurRadius: 27, - offset: Offset(0, -3), + separatorBuilder: (context, index) { + return mHeight(8); + }, + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: model.prescriptionReportListINP.length) + : Padding( + padding: const EdgeInsets.only(top: 150.0), + child: getNoDataWidget(context), + ) + else + model.prescriptionReportEnhList.length > 0 + ? ListView.separated( + padding: EdgeInsets.all(21), + itemBuilder: (context, index) { + return InkWell( + onTap: () { + PrescriptionReport prescriptionReport = PrescriptionReport( + imageSRCUrl: model.prescriptionReportEnhList[index].imageSRCUrl, + itemDescription: model.prescriptionReportEnhList[index].itemDescription, + itemDescriptionN: model.prescriptionReportEnhList[index].itemDescription, + routeN: model.prescriptionReportEnhList[index].route, + frequency: model.prescriptionReportEnhList[index].frequency, + frequencyN: model.prescriptionReportEnhList[index].frequency, + doseDailyQuantity: model.prescriptionReportEnhList[index].doseDailyQuantity, + days: model.prescriptionReportEnhList[index].days, + itemID: model.prescriptionReportEnhList[index].itemID, + remarks: model.prescriptionReportEnhList[index].remarks); + Navigator.push( + context, + FadePage( + page: PrescriptionDetailsPage( + prescriptionReport: prescriptionReport, + prescriptions: prescriptions, + ), + ), + ); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], ), - ], - ), - child: Padding( - padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12), - child: Row( - children: [ - Flexible( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - (model.prescriptionReportEnhList[index].itemDescription.isNotEmpty - ? model.prescriptionReportEnhList[index].itemDescription - : model.prescriptionReportEnhList[index].itemDescriptionN ?? '') - .toLowerCase() - .capitalizeFirstofEach, - style: TextStyle( - fontSize: 16, - color: Color(0xff2E303A), - letterSpacing: -0.64, - fontWeight: FontWeight.w600, - ), - ), - mHeight(10), - Row( + child: Padding( + padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12), + child: Row( + children: [ + Flexible( + child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - InkWell( - child: Stack( - alignment: Alignment.center, - children: [ - Container( - child: Image.network( - model.prescriptionReportEnhList[index].imageSRCUrl, - fit: BoxFit.cover, - width: 60, - height: 60, - ), - margin: EdgeInsets.zero, - clipBehavior: Clip.antiAlias, - decoration: cardRadius(2000), - ), - Container( - child: Icon(Icons.search,size: 18,color: Colors.white,), - padding: EdgeInsets.all(6), - decoration: containerRadius(Colors.black.withOpacity(0.3), 200), - ) - ], + Text( + (model.prescriptionReportEnhList[index].itemDescription.isNotEmpty + ? model.prescriptionReportEnhList[index].itemDescription + : model.prescriptionReportEnhList[index].itemDescriptionN ?? '') + .toLowerCase() + .capitalizeFirstofEach, + style: TextStyle( + fontSize: 16, + color: Color(0xff2E303A), + letterSpacing: -0.64, + fontWeight: FontWeight.w600, ), - onTap: (){ - showZoomImageDialog(context, model.prescriptionReportEnhList[index].imageSRCUrl,); - }, ), - mWidth(12), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - MyRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route, projectViewModel.isArabic), - MyRichText(TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(), - projectViewModel.isArabic), - mHeight(9), - Text( - model.prescriptionReportEnhList[index].remarks, - style: TextStyle( - color: Color(0xff575757), - fontSize: 12, - letterSpacing: -0.4, - fontWeight: FontWeight.w600, - ), + mHeight(10), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InkWell( + child: Stack( + alignment: Alignment.center, + children: [ + Container( + child: Image.network( + model.prescriptionReportEnhList[index].imageSRCUrl, + fit: BoxFit.cover, + width: 60, + height: 60, + ), + margin: EdgeInsets.zero, + clipBehavior: Clip.antiAlias, + decoration: cardRadius(2000), + ), + Container( + child: Icon( + Icons.search, + size: 18, + color: Colors.white, + ), + padding: EdgeInsets.all(6), + decoration: containerRadius(Colors.black.withOpacity(0.3), 200), + ) + ], ), - ], - ), - ) + onTap: () { + showZoomImageDialog( + context, + model.prescriptionReportEnhList[index].imageSRCUrl, + ); + }, + ), + mWidth(12), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + MyRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route, projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(), + projectViewModel.isArabic), + mHeight(9), + Text( + model.prescriptionReportEnhList[index].remarks, + style: TextStyle( + color: Color(0xff575757), + fontSize: 12, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ) + ], + ), ], ), - ], - ), - ), - Icon( - Icons.arrow_forward, - size: 16, + ), + Icon( + Icons.arrow_forward, + size: 16, + ), + ], ), - ], + ), ), - ), - ), - ); - }, - separatorBuilder: (context, index) { - return mHeight(12); - }, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemCount: model.prescriptionReportEnhList.length), + ); + }, + separatorBuilder: (context, index) { + return mHeight(12); + }, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemCount: model.prescriptionReportEnhList.length) + : Padding( + padding: const EdgeInsets.only(top: 150.0), + child: getNoDataWidget(context), + ), ], ), ), diff --git a/lib/pages/pharmacies/screens/lacum-registration-page.dart b/lib/pages/pharmacies/screens/lacum-registration-page.dart index c40771b8..dc309c00 100644 --- a/lib/pages/pharmacies/screens/lacum-registration-page.dart +++ b/lib/pages/pharmacies/screens/lacum-registration-page.dart @@ -48,18 +48,18 @@ class _LakumRegistrationPageState extends State { return BaseView( builder: (_, model, wi) => AppScaffold( - appBarTitle: - "${TranslationBase.of(context).register} ${TranslationBase.of(context).lakum}", + appBarTitle: "${TranslationBase.of(context).register} ${TranslationBase.of(context).lakum}", isShowAppBar: true, isShowDecPage: false, + isPharmacy: true, + showPharmacyCart: false, backgroundColor: Colors.white, baseViewModel: model, body: Container( width: double.infinity, child: SingleChildScrollView( child: SizedBox( - height: - mediaQuery.size.height - 60 - mediaQuery.padding.top, + height: mediaQuery.size.height - 60 - mediaQuery.padding.top, child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -130,35 +130,26 @@ class _LakumRegistrationPageState extends State { height: 10, ), Texts( - TranslationBase.of(context) - .prefferedLanguage, + TranslationBase.of(context).prefferedLanguage, fontSize: 13, fontWeight: FontWeight.normal, color: Color(0xff8a8a8a), ), InkWell( onTap: () { - RadioGroupDialog dialog = - new RadioGroupDialog( - context: context, - title: TranslationBase.of(context) - .prefferedLanguage, - okText: - TranslationBase.of(context) - .confirm, - cancelText: - TranslationBase.of(context) - .cancel_nocaps, - list: languages, - okFunction: (selectedValue) { - setState(() { - selectedLanguage = - selectedValue; - }); - print( - "selectedLanguage = ${selectedValue.name}"); - }, - cancelFunction: () => {}); + RadioGroupDialog dialog = new RadioGroupDialog( + context: context, + title: TranslationBase.of(context).prefferedLanguage, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + list: languages, + okFunction: (selectedValue) { + setState(() { + selectedLanguage = selectedValue; + }); + print("selectedLanguage = ${selectedValue.name}"); + }, + cancelFunction: () => {}); showDialog( barrierDismissible: false, context: context, @@ -170,11 +161,8 @@ class _LakumRegistrationPageState extends State { child: TextField( enabled: false, decoration: InputDecoration( - suffixIcon: - Icon(Icons.arrow_drop_down), - hintText: selectedLanguage == null - ? "${TranslationBase.of(context).prefferedLanguage}" - : "${selectedLanguage.name}", + suffixIcon: Icon(Icons.arrow_drop_down), + hintText: selectedLanguage == null ? "${TranslationBase.of(context).prefferedLanguage}" : "${selectedLanguage.name}", hintStyle: TextStyle( fontSize: 16, color: Colors.black, @@ -192,12 +180,10 @@ class _LakumRegistrationPageState extends State { ), Container( color: Colors.green, - margin: EdgeInsets.all(8), + margin: EdgeInsets.all(40), child: BorderedButton( TranslationBase.of(context).register, - backgroundColor: canSubmit - ? Color(0xff339933) - : Color(0xff99cc99), + backgroundColor: canSubmit ? Color(0xff339933) : Color(0xff99cc99), textColor: Colors.white, fontSize: 16, hPadding: 8, @@ -208,18 +194,13 @@ class _LakumRegistrationPageState extends State { context, FadePage( page: LakumTermsConditions( - widget - .patientIdentificationNo, - _firstNameController.text, - _lastNameController.text, - _mobileNumberController - .text, - selectedLanguage.id))) - .then((status) => { - if (status == 200) - {Navigator.pop(context, "")} - // back to previous page - }); + widget.patientIdentificationNo, _firstNameController.text, _lastNameController.text, _mobileNumberController.text, selectedLanguage.id))) + .then( + (status) => { + if (status == 200) {Navigator.pop(context, "")} + // back to previous page + }, + ); } : null, ), diff --git a/lib/pages/pharmacies/screens/lakum-main-page.dart b/lib/pages/pharmacies/screens/lakum-main-page.dart index 23adf2f6..ab8f367f 100644 --- a/lib/pages/pharmacies/screens/lakum-main-page.dart +++ b/lib/pages/pharmacies/screens/lakum-main-page.dart @@ -1,6 +1,8 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/PointsAmountPerYear.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-registration-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-setting-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-transfer-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-points-year-page.dart'; @@ -10,278 +12,230 @@ 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:flutter/material.dart'; +import 'package:provider/provider.dart'; import 'lacum-activitaion-vida-page.dart'; class LakumMainPage extends StatelessWidget { + ProjectViewModel projectViewModel; + @override Widget build(BuildContext context) { final mediaQuery = MediaQuery.of(context); + projectViewModel = Provider.of(context); return BaseView( - onModelReady: (model) => model.getLacumData(), - builder: (_, model, wi) => AppScaffold( - appBarTitle: TranslationBase.of(context).lakum, - isShowAppBar: true, - isPharmacy: true, - isShowDecPage: false, - backgroundColor: Colors.white, - baseViewModel: model, - appBarIcons: _buildAppBarICons(context, model), - // preferredSize: mediaQuery.size.height * 0.20, - body: Container( - width: double.infinity, - child: SingleChildScrollView( - child: (model.lacumGroupInformation != null && - model.lacumGroupInformation - .lakumInquiryInformationObjVersion != - null) - ? Column( - children: [ - Stack( - children: [ - Container( - height: mediaQuery.size.height * 0.15, - color: Colors.green, - ), - Column( - children: [ - SizedBox( - height: mediaQuery.size.height * 0.05, - ), - Container( - width: mediaQuery.size.width * 1, - child: LakumBannerWidget( - model, mediaQuery, true)), - ], - ) - ], - ), + onModelReady: (model) async { + await model.getLacumData(); + if (model.lacumInformation.yahalaAccountNo == 0 || model.lacumInformation.yahalaAccountNo == null) { + navigateToLakumRegister(context); + } else { + if (model.lacumInformation.status == "Hold") { + Navigator.pushReplacement(context, FadePage(page: LakumActivationVidaPage())); + } + } + }, + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).lakum, + isShowAppBar: true, + isPharmacy: true, + showPharmacyCart: false, + isShowDecPage: false, + backgroundColor: Colors.white, + baseViewModel: model, + appBarIcons: _buildAppBarICons(context, model), + // preferredSize: mediaQuery.size.height * 0.20, + body: Container( + width: double.infinity, + child: SingleChildScrollView( + child: (model.lacumGroupInformation != null && model.lacumGroupInformation.lakumInquiryInformationObjVersion != null) + ? Column( + children: [ + Stack( + children: [ + Container( + height: mediaQuery.size.height * 0.15, + color: Colors.green, + ), + Column( + children: [ + Container(width: mediaQuery.size.width * 1, child: LakumBannerWidget(model, mediaQuery, true)), + ], + ) + ], + ), + SizedBox( + height: 20, + ), + LakumHomeButtons(mediaQuery, model), + SizedBox( + height: 20, + ), + Container( + height: 100, + margin: EdgeInsets.symmetric(horizontal: 16), + child: ListView( + scrollDirection: Axis.horizontal, + children: [ + LacumPointsWidget(mediaQuery, 1, TranslationBase.of(context).balance, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount, + model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalance, null), SizedBox( - height: 20, + width: 8, ), - LakumHomeButtons(mediaQuery, model), + LacumPointsWidget(mediaQuery, 2, TranslationBase.of(context).gained, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount, + model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPoints, model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPointsAmountPerYear), SizedBox( - height: 20, - ), - Container( - height: 100, - margin: EdgeInsets.symmetric(horizontal: 16), - child: ListView( - scrollDirection: Axis.horizontal, - children: [ - LacumPointsWidget( - mediaQuery, - 1, - TranslationBase.of(context).balance, - model - .lacumGroupInformation - .lakumInquiryInformationObjVersion - .pointsBalanceAmount, - model - .lacumGroupInformation - .lakumInquiryInformationObjVersion - .pointsBalance, - null), - SizedBox( - width: 8, - ), - LacumPointsWidget( - mediaQuery, - 2, - TranslationBase.of(context).gained, - model - .lacumGroupInformation - .lakumInquiryInformationObjVersion - .pointsBalanceAmount, - model - .lacumGroupInformation - .lakumInquiryInformationObjVersion - .gainedPoints, - model - .lacumGroupInformation - .lakumInquiryInformationObjVersion - .gainedPointsAmountPerYear), - SizedBox( - width: 8, - ), - LacumPointsWidget( - mediaQuery, - 3, - TranslationBase.of(context).consumed, - model - .lacumGroupInformation - .lakumInquiryInformationObjVersion - .consumedPointsAmount != - null - ? int.parse(model - .lacumGroupInformation - .lakumInquiryInformationObjVersion - .consumedPointsAmount) - : 0, - model - .lacumGroupInformation - .lakumInquiryInformationObjVersion - .consumedPoints, - model - .lacumGroupInformation - .lakumInquiryInformationObjVersion - .consumedPointsAmountPerYear), - SizedBox( - width: 8, - ), - LacumPointsWidget( - mediaQuery, - 4, - TranslationBase.of(context).transferred, - 0, - model - .lacumGroupInformation - .lakumInquiryInformationObjVersion - .transferPoints, - model - .lacumGroupInformation - .lakumInquiryInformationObjVersion - .transferPointsAmountPerYear), - ], - ), + width: 8, ), + LacumPointsWidget( + mediaQuery, + 3, + TranslationBase.of(context).consumed, + model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount != null + ? int.parse(model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount) + : 0, + model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPoints, + model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmountPerYear), SizedBox( - height: 20, + width: 8, ), - SizedBox( - height: 8, - width: double.infinity, - child: Container( - color: Color(0xffefefef), - ), - ), - Container( - margin: EdgeInsets.symmetric( - vertical: 16, horizontal: 8), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Image.asset( - "assets/images/pharmacy_module/lakum/expired_icon.png", - fit: BoxFit.fill, - width: 25, - height: 25, - ), - Padding( - padding: - EdgeInsets.symmetric(horizontal: 8), - child: Texts( - "Expired", - fontSize: 14, - ), - ) - ], - ), - Texts( - "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints} Points", - fontWeight: FontWeight.bold, + LacumPointsWidget(mediaQuery, 4, TranslationBase.of(context).transferred, 0, model.lacumGroupInformation.lakumInquiryInformationObjVersion.transferPoints, + model.lacumGroupInformation.lakumInquiryInformationObjVersion.transferPointsAmountPerYear), + ], + ), + ), + SizedBox( + height: 20, + ), + SizedBox( + height: 8, + width: double.infinity, + child: Container( + color: Color(0xffefefef), + ), + ), + Container( + margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/lakum/expired_icon.png", + fit: BoxFit.fill, + width: 25, + height: 25, + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 8), + child: Texts( + "Expired", fontSize: 14, ), - ], - ), + ) + ], ), - SizedBox( - height: 2, - width: double.infinity, - child: Container( - color: Color(0xffefefef), - ), + Texts( + "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints} Points", + fontWeight: FontWeight.bold, + fontSize: 14, ), - Container( - margin: EdgeInsets.symmetric( - vertical: 16, horizontal: 8), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Image.asset( - "assets/images/pharmacy_module/lakum/waiting_gained_icon.png", - fit: BoxFit.fill, - width: 20, - height: 25, - ), - Padding( - padding: - EdgeInsets.symmetric(horizontal: 8), - child: Texts( - "Waiting gained", - fontSize: 14, - ), - ) - ], - ), - Texts( - "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} Points", - fontWeight: FontWeight.bold, + ], + ), + ), + SizedBox( + height: 2, + width: double.infinity, + child: Container( + color: Color(0xffefefef), + ), + ), + Container( + margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/lakum/waiting_gained_icon.png", + fit: BoxFit.fill, + width: 20, + height: 25, + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 8), + child: Texts( + "Waiting gained", fontSize: 14, ), - ], - ), + ) + ], ), - SizedBox( - height: 2, - width: double.infinity, - child: Container( - color: Color(0xffefefef), - ), + Texts( + "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} Points", + fontWeight: FontWeight.bold, + fontSize: 14, ), - Container( - margin: EdgeInsets.symmetric( - vertical: 16, horizontal: 8), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Image.asset( - "assets/images/pharmacy_module/lakum/will_be_expired_icon.png", - fit: BoxFit.fill, - width: 25, - height: 25, - ), - Padding( - padding: - EdgeInsets.symmetric(horizontal: 8), - child: Texts( - "Will Be Expired", - fontSize: 14, - ), - ) - ], - ), - Texts( - "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsWillBeExpired} Points", - fontWeight: FontWeight.bold, + ], + ), + ), + SizedBox( + height: 2, + width: double.infinity, + child: Container( + color: Color(0xffefefef), + ), + ), + Container( + margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/lakum/will_be_expired_icon.png", + fit: BoxFit.fill, + width: 25, + height: 25, + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 8), + child: Texts( + "Will Be Expired", fontSize: 14, ), - ], - ), + ) + ], ), - SizedBox( - height: 2, - width: double.infinity, - child: Container( - color: Color(0xffefefef), - ), + Texts( + "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsWillBeExpired} Points", + fontWeight: FontWeight.bold, + fontSize: 14, ), ], - ) - : Container(), - ), - ), - )); + ), + ), + SizedBox( + height: 2, + width: double.infinity, + child: Container( + color: Color(0xffefefef), + ), + ), + ], + ) + : Container(), + ), + ), + ), + ); + } + + navigateToLakumRegister(BuildContext context) { + Navigator.pushReplacement(context, FadePage(page: LakumRegistrationPage(projectViewModel.user.patientIdentificationNo))); } } @@ -291,12 +245,7 @@ List _buildAppBarICons(BuildContext context, LacumViewModel model) { icon: Icon(Icons.settings), color: Colors.white, onPressed: () { - Navigator.push( - context, - FadePage( - page: LakumSettingPage( - model.lacumInformation, model.lacumGroupInformation))) - .then((result) => {model.getLacumGroupData()}); + Navigator.push(context, FadePage(page: LakumSettingPage(model.lacumInformation, model.lacumGroupInformation))).then((result) => {model.getLacumGroupData()}); }, ), ]; @@ -318,9 +267,7 @@ class LakumHomeButtons extends StatelessWidget { child: InkWell( onTap: () { print("Account activate click"); - Navigator.push( - context, FadePage(page: LakumActivationVidaPage())) - .then((result) => {model.getLacumGroupData()}); + Navigator.push(context, FadePage(page: LakumActivationVidaPage())).then((result) => {model.getLacumGroupData()}); }, child: Container( padding: EdgeInsets.symmetric(horizontal: 8), @@ -363,12 +310,7 @@ class LakumHomeButtons extends StatelessWidget { child: InkWell( onTap: () { print("Lacum transfer click"); - Navigator.push( - context, - FadePage( - page: LacumTransferPage(model.lacumInformation, - model.lacumGroupInformation))) - .then((result) => {model.getLacumGroupData()}); + Navigator.push(context, FadePage(page: LacumTransferPage(model.lacumInformation, model.lacumGroupInformation))).then((result) => {model.getLacumGroupData()}); }, child: Container( padding: EdgeInsets.symmetric(horizontal: 8), @@ -419,8 +361,7 @@ class LacumPointsWidget extends StatelessWidget { Color titleColor; final List pointsAmountPerYear; - LacumPointsWidget(this.mediaQuery, this.pointType, this.title, this.riyal, - this.point, this.pointsAmountPerYear) { + LacumPointsWidget(this.mediaQuery, this.pointType, this.title, this.riyal, this.point, this.pointsAmountPerYear) { if (pointType == 1) { titleColor = Color(0xffefefef); } else if (pointType == 2) { @@ -438,8 +379,7 @@ class LacumPointsWidget extends StatelessWidget { onTap: () { if (pointType != 1) { if (pointsAmountPerYear != null && pointsAmountPerYear.length > 0) { - Navigator.push(context, - FadePage(page: LakumPointsYearPage(pointsAmountPerYear))); + Navigator.push(context, FadePage(page: LakumPointsYearPage(pointsAmountPerYear))); } else { // show snackBar No Details Points are there } diff --git a/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart b/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart index b8bc5808..a0a2bb48 100644 --- a/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart +++ b/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart @@ -7,7 +7,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import '../../../../../locator.dart'; import '../../../../../routes.dart'; @@ -45,7 +44,7 @@ class _FooterWidgetState extends State { borderRadius: BorderRadius.all( Radius.circular(0.0), ), - border: Border.all(color: HexColor('#707070'), width: 0), + border: Border.all(color: Color(0xFF707070), width: 0), ), width: double.infinity, height: quantityUI, diff --git a/lib/pages/pharmacy/profile/profile.dart b/lib/pages/pharmacy/profile/profile.dart index a82a74eb..2b11887d 100644 --- a/lib/pages/pharmacy/profile/profile.dart +++ b/lib/pages/pharmacy/profile/profile.dart @@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/pages/login/welcome.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/compare.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/my_reviews.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-activitaion-vida-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-main-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-terms-conditions-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart'; @@ -98,7 +99,7 @@ class _ProfilePageState extends State { isPharmacy: true, body: user != null ? Container( - color: Colors.white, + color: Colors.white, child: SingleChildScrollView( child: Column( children: [ @@ -123,12 +124,8 @@ class _ProfilePageState extends State { Column(children: [ Row(children: [ Text( - TranslationBase.of(context) - .welcome, - style: TextStyle( - fontSize: 14.0, - fontWeight: FontWeight.bold, - color: Colors.grey), + TranslationBase.of(context).welcome, + style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold, color: Colors.grey), ), ]), SizedBox( @@ -136,16 +133,8 @@ class _ProfilePageState extends State { ), Row(children: [ Text( - languageID == "ar" - ? user.firstNameN.toString() + - " " + - user.lastNameN.toString() - : user.firstName.toString() + - " " + - user.lastName.toString(), - style: TextStyle( - fontSize: 14.0, - fontWeight: FontWeight.bold), + languageID == "ar" ? user.firstNameN.toString() + " " + user.lastNameN.toString() : user.firstName.toString() + " " + user.lastName.toString(), + style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold), ), ]), ]), @@ -172,15 +161,10 @@ class _ProfilePageState extends State { child: InkWell( onTap: () { if (customerId == null) { - AppToast.showErrorToast( - message: "Customer not found"); + AppToast.showErrorToast(message: "Customer not found"); return; } - Navigator.push( - context, - FadePage( - page: OrderPage( - customerID: customerId))); + Navigator.push(context, FadePage(page: OrderPage(customerID: customerId))); }, child: Column( children: [ @@ -207,8 +191,10 @@ class _ProfilePageState extends State { Expanded( child: InkWell( onTap: () { - Navigator.push(context, - FadePage(page: LakumMainPage())); + if (customerId == null || customerId == '') + Navigator.push(context, FadePage(page: LakumActivationVidaPage())); + else + Navigator.push(context, FadePage(page: LakumMainPage())); }, child: Column( children: [ @@ -222,9 +208,7 @@ class _ProfilePageState extends State { ), Text( TranslationBase.of(context).lakum, - style: TextStyle( - fontSize: 13.0, - fontWeight: FontWeight.bold), + style: TextStyle(fontSize: 13.0, fontWeight: FontWeight.bold), ), ], ), @@ -233,9 +217,7 @@ class _ProfilePageState extends State { Expanded( child: InkWell( onTap: () { - Navigator.push( - context, - FadePage(page: WishlistPage())); + Navigator.push(context, FadePage(page: WishlistPage())); }, child: Column( children: [ @@ -261,8 +243,7 @@ class _ProfilePageState extends State { Expanded( child: InkWell( onTap: () { - Navigator.push(context, - FadePage(page: MyReviewsPage())); + Navigator.push(context, FadePage(page: MyReviewsPage())); }, child: Column( children: [ @@ -307,9 +288,7 @@ class _ProfilePageState extends State { children: [ Text( TranslationBase.of(context).myAccount, - style: TextStyle( - fontSize: 16.0, - fontWeight: FontWeight.bold), + style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold), ), SizedBox( height: 10, @@ -320,10 +299,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, - FadePage( - page: HomePrescriptionsPage())); + Navigator.push(context, FadePage(page: HomePrescriptionsPage())); }, child: Row( children: [ @@ -336,8 +312,7 @@ class _ProfilePageState extends State { width: 15, ), Text( - TranslationBase.of(context) - .myPrescription, + TranslationBase.of(context).myPrescription, style: TextStyle( fontSize: 13.0, ), @@ -354,15 +329,11 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push(context, - FadePage(page: ComparePage())); + Navigator.push(context, FadePage(page: ComparePage())); }, child: Row( children: [ - Image.asset( - 'assets/images/pharmacy/compare.png', - width: 35, - height: 35), + Image.asset('assets/images/pharmacy/compare.png', width: 35, height: 35), SizedBox( width: 15, ), @@ -384,10 +355,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, - FadePage( - page: HomePrescriptionsPage())); + Navigator.push(context, FadePage(page: HomePrescriptionsPage())); }, child: Row( children: [ @@ -400,8 +368,7 @@ class _ProfilePageState extends State { width: 20, ), Text( - TranslationBase.of(context) - .medicationsRefill, + TranslationBase.of(context).medicationsRefill, style: TextStyle( fontSize: 13.0, ), @@ -418,8 +385,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, FadePage(page: MyFamily())); + Navigator.push(context, FadePage(page: MyFamily())); }, child: Row( children: [ @@ -449,10 +415,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, - FadePage( - page: PharmacyAddressesPage())); + Navigator.push(context, FadePage(page: PharmacyAddressesPage())); }, child: Row( children: [ @@ -465,8 +428,7 @@ class _ProfilePageState extends State { width: 20, ), Text( - TranslationBase.of(context) - .shippingAddresses, + TranslationBase.of(context).shippingAddresses, style: TextStyle( fontSize: 13.0, ), @@ -483,10 +445,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, - FadePage( - page: PharmacyTermsConditions())); + Navigator.push(context, FadePage(page: PharmacyTermsConditions())); }, child: Row( children: [ @@ -499,8 +458,7 @@ class _ProfilePageState extends State { width: 10, ), Text( - TranslationBase.of(context) - .conditionsHMG, + TranslationBase.of(context).conditionsHMG, style: TextStyle( fontSize: 13.0, ), @@ -517,15 +475,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, - FadePage( - page: LakumTermsConditions( - this.identificationNo, - this.firstName, - this.lastName, - this.mobileNo, - this.languageId))); + Navigator.push(context, FadePage(page: LakumTermsConditions(this.identificationNo, this.firstName, this.lastName, this.mobileNo, this.languageId))); }, child: Row( children: [ @@ -540,8 +490,7 @@ class _ProfilePageState extends State { width: 10, ), Text( - TranslationBase.of(context) - .conditions, + TranslationBase.of(context).conditions, style: TextStyle( fontSize: 13.0, ), @@ -572,9 +521,7 @@ class _ProfilePageState extends State { children: [ Text( TranslationBase.of(context).reachUs, - style: TextStyle( - fontSize: 16.0, - fontWeight: FontWeight.bold), + style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold), ), SizedBox( height: 5, @@ -585,8 +532,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push(context, - FadePage(page: LiveChatPage())); + Navigator.push(context, FadePage(page: LiveChatPage())); }, child: Row( children: [ @@ -614,8 +560,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push(context, - FadePage(page: FindUsPage())); + Navigator.push(context, FadePage(page: FindUsPage())); }, child: Row( children: [ @@ -628,8 +573,7 @@ class _ProfilePageState extends State { width: 20, ), Text( - TranslationBase.of(context) - .ourLocations, + TranslationBase.of(context).ourLocations, style: TextStyle(fontSize: 13.0), ), ], diff --git a/lib/pages/symptom-checker/select-gender.dart b/lib/pages/symptom-checker/select-gender.dart index aae64bb6..c0ca1712 100644 --- a/lib/pages/symptom-checker/select-gender.dart +++ b/lib/pages/symptom-checker/select-gender.dart @@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_xlider/flutter_xlider.dart'; +// import 'package:flutter_xlider/flutter_xlider.dart'; class SelectGender extends StatefulWidget { @override @@ -82,18 +82,18 @@ class _SelectGender extends State { SizedBox( height: 30, ), - FlutterSlider( - values: [slider], - max: 90, - min: 14, - onDragCompleted: (handlerIndex, lowerValue, upperValue) { - print(lowerValue); - print(upperValue); - setState(() { - slider = upperValue; - }); - }, - ), + // FlutterSlider( + // values: [slider], + // max: 90, + // min: 14, + // onDragCompleted: (handlerIndex, lowerValue, upperValue) { + // print(lowerValue); + // print(upperValue); + // setState(() { + // slider = upperValue; + // }); + // }, + // ), ], ), Expanded( diff --git a/lib/theme/theme_value.dart b/lib/theme/theme_value.dart index 96392b4a..1c01d990 100644 --- a/lib/theme/theme_value.dart +++ b/lib/theme/theme_value.dart @@ -2,7 +2,6 @@ import 'dart:ui'; import 'package:diplomaticquarterapp/Constants.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; /// ---- Default Theme ---- /// @@ -40,7 +39,7 @@ defaultTheme({fontName}) { buttonColor: Colors.black, toggleableActiveColor: secondaryColor, indicatorColor: secondaryColor, - bottomSheetTheme: BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), + bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)), cursorColor: Colors.grey, primaryTextTheme: TextTheme(bodyText2: TextStyle(color: Colors.white)), iconTheme: IconThemeData(), @@ -92,7 +91,7 @@ invertThemes({fontName}) { buttonColor: Colors.black, toggleableActiveColor: secondaryColor, indicatorColor: secondaryColor, - bottomSheetTheme: BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), + bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)), cursorColor: Colors.black, iconTheme: IconThemeData(), appBarTheme: AppBarTheme( @@ -147,7 +146,7 @@ bwThemes({fontName}) { primaryColor: Color(0xfffffff4), toggleableActiveColor: secondaryColor, indicatorColor: secondaryColor, - bottomSheetTheme: BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), + bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)), cursorColor: Colors.black, iconTheme: IconThemeData(), appBarTheme: AppBarTheme( diff --git a/lib/uitl/SignalRUtil.dart b/lib/uitl/SignalRUtil.dart index 52f34cf7..a1a411e0 100644 --- a/lib/uitl/SignalRUtil.dart +++ b/lib/uitl/SignalRUtil.dart @@ -29,6 +29,10 @@ class SignalRUtil { }); } + void closeSignalRConnection() { + connectionBuilder.stop(); + } + void handleIncomingMessage(List message) { print(message.toString()); } @@ -38,7 +42,7 @@ class SignalRUtil { } bool getConnectionState() { - if (connectionBuilder.state == HubConnectionState.connected) return true; - if (connectionBuilder.state == HubConnectionState.connected) return true; + if (connectionBuilder.state == HubConnectionState.connected || connectionBuilder.state == HubConnectionState.connecting) return true; + if (connectionBuilder.state == HubConnectionState.disconnected || connectionBuilder.state == HubConnectionState.disconnecting) return false; } } diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 5c32aaa7..92656188 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2582,6 +2582,8 @@ class TranslationBase { String get cholesTitle => localizedValues["cholesTitle"][locale.languageCode]; + String get laserClinic => localizedValues["laserClinic"][locale.languageCode]; + } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/uitl/utils_new.dart b/lib/uitl/utils_new.dart index 70bd7df0..832a92b1 100644 --- a/lib/uitl/utils_new.dart +++ b/lib/uitl/utils_new.dart @@ -570,10 +570,6 @@ bool timeCalculator(int startHour, int startMint, int endHour, int endMint) { DateTime now = DateTime.now(); DateTime startDate = DateTime(now.year, now.month, now.day, startHour, startHour); DateTime endDate = DateTime(now.year, now.month, now.day, endHour, endMint); - print(startDate.toString()); - print(endDate.toString()); - print(now); - print("------------"); if (startDate.isBefore(now) && endDate.isAfter(now)) return true; else diff --git a/lib/widgets/bottom_navigation/bottom_nav_bar.dart b/lib/widgets/bottom_navigation/bottom_nav_bar.dart index 23fbaccd..9f9c7c0c 100644 --- a/lib/widgets/bottom_navigation/bottom_nav_bar.dart +++ b/lib/widgets/bottom_navigation/bottom_nav_bar.dart @@ -5,7 +5,6 @@ import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -97,8 +96,8 @@ class _BottomNavBarState extends State { // ), if (/*widget.index == 0 && */ projectViewModel.havePrivilege(34)) BottomNavigationItem( - icon: EvaIcons.calendar, - activeIcon: EvaIcons.calendar, + icon: Icons.calendar_today_sharp, + activeIcon: Icons.calendar_today_sharp, changeIndex: _changeIndex, index: widget.index, currentIndex: 4, diff --git a/lib/widgets/bottom_options/BottomSheet.dart b/lib/widgets/bottom_options/BottomSheet.dart index f0016fc5..a9e9c4c1 100644 --- a/lib/widgets/bottom_options/BottomSheet.dart +++ b/lib/widgets/bottom_options/BottomSheet.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:feather_icons_flutter/feather_icons_flutter.dart'; +// import 'package:feather_icons_flutter/feather_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; @@ -20,10 +20,10 @@ class ImageOptions { ), _BottomSheetItem( title: TranslationBase.of(context).gallery, - icon: FeatherIcons.image, + icon: Icons.image, onTap: () async { File _image = - await ImagePicker.pickImage(source: ImageSource.gallery, imageQuality: 50); + await ImagePicker.pickImage(source: ImageSource.gallery, imageQuality: 20); String fileName = _image.path; final bytes = File(fileName).readAsBytesSync(); String base64Encode = base64.encode(bytes); @@ -34,10 +34,10 @@ class ImageOptions { ), _BottomSheetItem( title: TranslationBase.of(context).camera, - icon: FeatherIcons.camera, + icon: Icons.camera_alt, onTap: () async { File _image = - await ImagePicker.pickImage(source: ImageSource.camera, imageQuality: 50); + await ImagePicker.pickImage(source: ImageSource.camera, imageQuality: 20); String fileName = _image.path; final bytes = File(fileName).readAsBytesSync(); String base64Encode = base64.encode(bytes); diff --git a/lib/widgets/charts/app_bar_chart.dart b/lib/widgets/charts/app_bar_chart.dart deleted file mode 100644 index 19362f32..00000000 --- a/lib/widgets/charts/app_bar_chart.dart +++ /dev/null @@ -1,53 +0,0 @@ -import 'package:charts_flutter/flutter.dart' as charts; -import 'package:flutter/material.dart'; - -class AppBarChart extends StatelessWidget { - const AppBarChart({ - Key key, - @required this.isArabic, - @required this.seriesList, - }) : super(key: key); - - final List seriesList; - final bool isArabic; - - @override - Widget build(BuildContext context) { - return Container( - height: 400, - //margin: EdgeInsets.only(top: 60), - child: charts.BarChart( - seriesList, - // animate: animate, - domainAxis: charts.OrdinalAxisSpec( - renderSpec: charts.GridlineRendererSpec( - labelAnchor: isArabic ? charts.TickLabelAnchor.before : charts.TickLabelAnchor.after, - labelRotation: -30, - labelOffsetFromAxisPx: 30, - labelOffsetFromTickPx: 15, - labelJustification: charts.TickLabelJustification.inside, - ), - ), - - /// Customize the primary measure axis using a small tick renderer. - /// Use String instead of num for ordinal domain axis - /// (typically bar charts). - primaryMeasureAxis: new charts.NumericAxisSpec( - renderSpec: new charts.GridlineRendererSpec( - // Display the measure axis labels below the gridline. - // - // 'Before' & 'after' follow the axis value direction. - // Vertical axes draw 'before' below & 'after' above the tick. - // Horizontal axes draw 'before' left & 'after' right the tick. - labelAnchor: charts.TickLabelAnchor.before, - - // Left justify the text in the axis. - // - // Note: outside means that the secondary measure axis would right - // justify. - labelJustification: charts.TickLabelJustification.outside, - )), - ), - ); - } -} diff --git a/lib/widgets/charts/app_line_chart.dart b/lib/widgets/charts/app_line_chart.dart deleted file mode 100644 index 1a29b1e6..00000000 --- a/lib/widgets/charts/app_line_chart.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'package:charts_flutter/flutter.dart' as charts; -import 'package:flutter/material.dart'; - -/// chart line -/// [seriesList] charts series -/// [chartTitle] the charts title -/// [animate] enable and disable animate on create chart -/// [includeArea] chart include Area -/// [stacked] stacked chart over the design -class AppLineChart extends StatelessWidget { - final List seriesList; - final String chartTitle; - final bool animate; - final bool includeArea; - final bool stacked; - - AppLineChart( - {Key key, - @required this.seriesList, - this.chartTitle, - this.animate = true, - this.includeArea = false, - this.stacked = true}); - - @override - Widget build(BuildContext context) { - return Container( - child: Column( - children: [ - Text( - chartTitle, - style: TextStyle(fontSize: 24.0, fontWeight: FontWeight.bold), - ), - Expanded( - child: charts.LineChart(seriesList, - defaultRenderer: charts.LineRendererConfig( - includeArea: false, stacked: true), - animate: animate), - ), - ], - ), - ); - } -} diff --git a/lib/widgets/data_display/list/custom_Item.dart b/lib/widgets/data_display/list/custom_Item.dart index c11af999..d5123e8d 100644 --- a/lib/widgets/data_display/list/custom_Item.dart +++ b/lib/widgets/data_display/list/custom_Item.dart @@ -1,4 +1,3 @@ -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; /// Custom Item widget @@ -32,7 +31,7 @@ class CustomItem extends StatelessWidget { this.disabled: false, this.onTap, this.startIconColor, - this.endIcon = EvaIcons.chevronRight, + this.endIcon = Icons.chevron_right_sharp, this.padding, this.child, this.endIconColor, diff --git a/lib/widgets/input/date_picker/date_picker.dart b/lib/widgets/input/date_picker/date_picker.dart index f9532052..f3e2406c 100644 --- a/lib/widgets/input/date_picker/date_picker.dart +++ b/lib/widgets/input/date_picker/date_picker.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'dart:math' as math; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/gestures.dart' show DragStartBehavior; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; @@ -862,7 +861,7 @@ class _MonthPickerState extends State disabledColor: Theme.of(context).disabledColor.withOpacity(0.2), color: Theme.of(context).disabledColor, - icon: const Icon(EvaIcons.chevronLeft), + icon: const Icon(Icons.chevron_left_sharp), tooltip: _isDisplayingFirstMonth ? null : '${localizations.previousMonthTooltip} ${localizations.formatMonthYear(_previousMonthDate)}', @@ -886,7 +885,7 @@ class _MonthPickerState extends State disabledColor: Theme.of(context).disabledColor.withOpacity(0.2), color: Theme.of(context).disabledColor, - icon: const Icon(EvaIcons.chevronRight), + icon: const Icon(Icons.chevron_right_sharp), tooltip: _isDisplayingLastMonth ? null : '${localizations.nextMonthTooltip} ${localizations.formatMonthYear(_nextMonthDate)}', diff --git a/lib/widgets/input/text_field.dart b/lib/widgets/input/text_field.dart index 55ebbc3d..9bb899cb 100644 --- a/lib/widgets/input/text_field.dart +++ b/lib/widgets/input/text_field.dart @@ -1,4 +1,3 @@ -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -156,7 +155,7 @@ class _TextFieldsState extends State { ); }, child: Icon( - EvaIcons.eye, + Icons.remove_red_eye_sharp, size: 24.0, color: Color.fromRGBO(78, 62, 253, 1.0), ), @@ -167,7 +166,7 @@ class _TextFieldsState extends State { view = true; }); }, - child: Icon(EvaIcons.eyeOff, + child: Icon(Icons.remove_red_eye_sharp, size: 24.0, color: Colors.grey[500]), ), ); diff --git a/lib/widgets/offers_packages/offers_packages.dart b/lib/widgets/offers_packages/offers_packages.dart index 2b255ccb..aed4f699 100644 --- a/lib/widgets/offers_packages/offers_packages.dart +++ b/lib/widgets/offers_packages/offers_packages.dart @@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/loadings/ShimmerLoading.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; class OffersAndPackagesWidget extends StatefulWidget { final List models; @@ -168,7 +167,7 @@ class _OfferPackagesItemWidgetState extends State { alignment: Alignment.bottomLeft, child: MaterialButton( height: 30, - color: HexColor('#D81A2E'), + color: Color(0xFFD81A2E), onPressed: () => widget.model.action.onClick(model.item), child: Texts( TranslationBase.of(context).view, diff --git a/lib/widgets/others/StarRating.dart b/lib/widgets/others/StarRating.dart index 74bdbfe3..54ad3162 100644 --- a/lib/widgets/others/StarRating.dart +++ b/lib/widgets/others/StarRating.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; class StarRating extends StatelessWidget { @@ -23,7 +22,7 @@ class StarRating extends StatelessWidget { Padding( padding: EdgeInsets.only(right: 1.0), child: Icon( - (index+1) <= (totalAverage ?? 0) ? EvaIcons.star : EvaIcons.starOutline, + (index+1) <= (totalAverage ?? 0) ? Icons.star : Icons.star_border_outlined, size: size, color: (index+1) <= (totalAverage ?? 0) ? Color.fromRGBO(255, 186, 0, 1.0) : Theme.of(context).hintColor ), diff --git a/lib/widgets/others/close_back.dart b/lib/widgets/others/close_back.dart index 75fe05e8..804e1d00 100644 --- a/lib/widgets/others/close_back.dart +++ b/lib/widgets/others/close_back.dart @@ -1,4 +1,3 @@ -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; class CloseBack extends StatelessWidget{ @@ -16,7 +15,7 @@ class CloseBack extends StatelessWidget{ onTap: Feedback.wrapForTap(() { onTap!=null ? onTap() : Navigator.pop(context); }, context), - child: Icon(EvaIcons.close, color: Colors.white), + child: Icon(Icons.close, color: Colors.white), ); } } \ No newline at end of file diff --git a/lib/widgets/pharmacy/bottom_nav_pharmacy_bar.dart b/lib/widgets/pharmacy/bottom_nav_pharmacy_bar.dart index d1490d74..d84a8b4f 100644 --- a/lib/widgets/pharmacy/bottom_nav_pharmacy_bar.dart +++ b/lib/widgets/pharmacy/bottom_nav_pharmacy_bar.dart @@ -1,7 +1,5 @@ import 'package:diplomaticquarterapp/d_q_icons_icons.dart'; -import 'package:diplomaticquarterapp/pages/landing/home_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'bottom_nav_pharmacy_home_item.dart'; @@ -10,8 +8,8 @@ import 'bottom_nav_pharmacy_item.dart'; class BottomNavPharmacyBar extends StatefulWidget { final ValueChanged changeIndex; final int index; - BottomNavPharmacyBar({Key key, this.changeIndex, this.index}) - : super(key: key); + + BottomNavPharmacyBar({Key key, this.changeIndex, this.index}) : super(key: key); @override _BottomNavPharmacyBarState createState() => _BottomNavPharmacyBarState(); @@ -35,8 +33,8 @@ class _BottomNavPharmacyBarState extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ BottomNavHomeItem( - icon: EvaIcons.image, - activeIcon: EvaIcons.image, + icon: Icons.image, + activeIcon: Icons.image, changeIndex: _changeIndex, index: widget.index, currentIndex: 0, @@ -50,14 +48,7 @@ class _BottomNavPharmacyBarState extends State { currentIndex: 1, title: TranslationBase.of(context).categorise, ), - BottomNavPharmacyItem( - icon: EvaIcons.home, - activeIcon: EvaIcons.home, - changeIndex: _changeIndex, - index: widget.index, - currentIndex: 0, - isHome: true, - title: TranslationBase.of(context).home), + BottomNavPharmacyItem(icon: Icons.home, activeIcon: Icons.home, changeIndex: _changeIndex, index: widget.index, currentIndex: 0, isHome: true, title: TranslationBase.of(context).home), BottomNavPharmacyItem( icon: DQIcons.user_menu_icon, activeIcon: DQIcons.user_menu_icon, @@ -67,12 +58,7 @@ class _BottomNavPharmacyBarState extends State { title: TranslationBase.of(context).myAccount, ), BottomNavPharmacyItem( - icon: DQIcons.cart_menu_icon, - activeIcon: DQIcons.cart_menu_icon, - changeIndex: _changeIndex, - index: widget.index, - currentIndex: 3, - title: TranslationBase.of(context).cart) + icon: DQIcons.cart_menu_icon, activeIcon: DQIcons.cart_menu_icon, changeIndex: _changeIndex, index: widget.index, currentIndex: 3, title: TranslationBase.of(context).cart) ], ), ), diff --git a/lib/widgets/show_zoom_image_dialog.dart b/lib/widgets/show_zoom_image_dialog.dart index 2340c259..0864404c 100644 --- a/lib/widgets/show_zoom_image_dialog.dart +++ b/lib/widgets/show_zoom_image_dialog.dart @@ -1,24 +1,24 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:flutter/material.dart'; -import 'package:progress_hud_v2/generated/i18n.dart'; -showZoomImageDialog(BuildContext context, String url) { +showZoomImageDialog(BuildContext context, String url, {bool isNetworkImage = true}) { showDialog( context: context, builder: (BuildContext context) => Dialog( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12.0), ), //this right here - child: ShowZoomImage(url), + child: ShowZoomImage(url, isNetworkImage), ), ); } class ShowZoomImage extends StatelessWidget { String url; + bool isNetworkImage = true; - ShowZoomImage(this.url); + ShowZoomImage(this.url, this.isNetworkImage); @override Widget build(BuildContext context) { @@ -35,11 +35,17 @@ class ShowZoomImage extends StatelessWidget { Navigator.pop(context); }, ), - CachedNetworkImage( - imageUrl: url, - height: MediaQuery.of(context).size.width / 1.4, - width: double.infinity, - ), + isNetworkImage + ? CachedNetworkImage( + imageUrl: url, + height: MediaQuery.of(context).size.width / 1.4, + width: double.infinity, + ) + : Image.asset( + url, + height: MediaQuery.of(context).size.width / 1.4, + width: double.infinity, + ), mHeight(12), ], ), diff --git a/pubspec.yaml b/pubspec.yaml index c871fdb2..3bdadc73 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,13 +11,12 @@ dependencies: flutter: sdk: flutter - # Localizations flutter_localizations: sdk: flutter intl: ^0.16.0 # web view - webview_flutter: ^0.3.24 + webview_flutter: ^1.0.7 # http client http: ^0.12.1 connectivity: ^0.4.9+3 @@ -39,11 +38,9 @@ dependencies: # Permissions permission_handler: ^5.0.0+hotfix.3 device_info: ^0.4.2+4 -#popub - giffy_dialog: ^1.8.0 # Flutter Html View - flutter_html: 1.0.2 + flutter_html: ^1.2.0 # Native flutter_device_type: ^0.2.0 @@ -56,45 +53,38 @@ dependencies: firebase_messaging: ^7.0.3 firebase_analytics: ^6.3.0 cloud_firestore: ^0.14.3 - android_intent: ^0.3.7+7 # Progress bar progress_hud_v2: ^2.0.0 percent_indicator: ^2.1.5 # Icons - feather_icons_flutter: any - eva_icons_flutter: any font_awesome_flutter: any - cupertino_icons: ^0.1.3 + cupertino_icons: ^1.0.0 # Image Attachments image_picker: ^0.6.7+1 - image_cropper: ^1.2.1 #GIF image flutter_gifimage: ^1.0.1 photo_view: any -# flutter_webrtc: any + # flutter_webrtc: any # UI Reqs - dotted_border: 1.0.5 expandable: ^4.1.4 - hexcolor: ^1.0.1 # Notification Banner - dropdown_banner: ^1.4.0 - flutter_xlider: ^3.4.0 -# flutter_local_notifications: + # dropdown_banner: ^1.4.0 + # flutter_xlider: ^3.4.0 + # flutter_local_notifications: # charts charts_flutter: ^0.9.0 - google_maps_flutter: ^1.0.3 huawei_map: ^5.0.3+303 # Qr code Scanner TODO fix it -# barcode_scanner: ^1.0.1 + # barcode_scanner: ^1.0.1 flutter_polyline_points: ^0.1.0 location: ^2.3.5 # Qr code Scanner @@ -104,15 +94,10 @@ dependencies: rating_bar: ^0.2.0 # Calendar -# table_calendar: ^2.3.0 syncfusion_flutter_calendar: ^18.4.49 -# syncfusion_flutter_charts: any # SVG Images - flutter_svg: ^0.18.0 - - # Location Helper - map_launcher: ^0.8.1 + flutter_svg: ^0.19.0 #Calendar Events manage_calendar_events: ^1.0.2 @@ -129,15 +114,6 @@ dependencies: #hijri hijri: ^2.0.3 - #Email Sender - flutter_email_sender: ^3.0.1 - - #Popup_window - popup_box: ^0.1.0 - - #Numbers - number_inc_dec: ^0.6.6 - #datetime_picker flutter_datetime_picker: ^1.4.0 # Carousel @@ -161,19 +137,17 @@ dependencies: flutter_webrtc: ^0.5.9 screen: ^0.0.5 + #google maps places google_maps_place_picker: ^1.0.0 - typewriter: ^0.0.3 -#countdown timer for Upcoming List - # flutter_countdown_timer: ^1.4.0 #countdown timer for Upcoming List flutter_countdown_timer: ^1.6.0 + #Dependencies for video call implementation native_device_orientation: ^0.3.0 enum_to_string: ^1.0.9 -# recase: ^3.0.0 - wakelock: ^0.1.4 + wakelock: ^0.2.1+1 after_layout: ^1.0.7 twilio_programmable_video: ^0.6.2 cached_network_image: ^2.4.1 @@ -194,7 +168,7 @@ dependencies: in_app_review: ^1.0.4 badges: ^1.1.4 -# open_settings: ^2.0.1 + # Dep by Zohaib shimmer: ^1.1.2 carousel_slider: ^2.3.1 @@ -252,7 +226,6 @@ flutter: - assets/images/new/services/ - assets/images/new/appointment-rating/ - assets/images/new/payment/ - - assets/images/new/body/ fonts: - family: WorkSans