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/lib/config/localized_values.dart b/lib/config/localized_values.dart index aa786e77..5a8488f0 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1611,4 +1611,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/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 19c8eac2..3c0368fc 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -116,8 +116,8 @@ class BaseAppClient { // body['IdentificationNo'] = 1009199553; // body['MobileNo'] = "966545156035"; - // body['PatientID'] = 1018977; - // body['TokenID'] = "@dm!n"; + body['PatientID'] = 1018977; + body['TokenID'] = "@dm!n"; body.removeWhere((key, value) => key == null || value == null); 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..5d4d8194 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 } @@ -89,6 +87,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 +105,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 + ? 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), + ]; - 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]; + }, + ), + ); + }).withBorderedContainer, SizedBox(height: 12), CommonDropDownView(TranslationBase.of(context).gender, _selectedGenderIndex == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female, () { List list = [ @@ -226,19 +226,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), ), diff --git a/lib/pages/BookAppointment/LaserBooking.dart b/lib/pages/BookAppointment/LaserBooking.dart index 1f4be912..4bc082f8 100644 --- a/lib/pages/BookAppointment/LaserBooking.dart +++ b/lib/pages/BookAppointment/LaserBooking.dart @@ -1,5 +1,8 @@ +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_html/flutter_html.dart'; +import 'package:flutter_svg/flutter_svg.dart'; class LaserBooking extends StatefulWidget { @override @@ -14,10 +17,10 @@ class _LaserBookingState extends State { isShowAppBar: true, showNewAppBarTitle: true, showNewAppBar: true, - appBarTitle: "Laser", + appBarTitle: TranslationBase.of(context).laserClinic, body: Container( - child: Column( - children: [], + child: Html( + data: '', ), )); } 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/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..78f3c173 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -243,14 +243,14 @@ class _LandingPageState extends State with WidgetsBindingObserver { _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(); + signalRUtil.startSignalRConnection(); }); // HMG (Guest/Internet) Wifi Access [Zohaib Kambrani] //for now commented to reduce this call will enable it when needed diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart index b93e4e55..d9fce1e3 100644 --- a/lib/pages/login/register.dart +++ b/lib/pages/login/register.dart @@ -19,11 +19,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 @@ -326,15 +327,14 @@ 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, - okFunction: () { - AlertDialogBox.closeAlertDialog(context); - Navigator.of(context).pop(); - }).showAlertDialog(context); + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {Navigator.of(context).pop()}, + cancelFunction: () => {}); + dialog.showAlertDialog(context); } else { nRequest['forRegister'] = true; nRequest['isRegister'] = true; 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/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/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/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 134da8bf..409ea6b9 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2580,6 +2580,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/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 030986ed..2f8b6005 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,6 @@ dependencies: flutter: sdk: flutter - # Localizations flutter_localizations: sdk: flutter @@ -39,8 +38,6 @@ 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 @@ -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 # 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,16 +94,11 @@ 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 - #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,18 +137,16 @@ 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 after_layout: ^1.0.7 twilio_programmable_video: ^0.6.2 @@ -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