diff --git a/assets/images/new/visa.png b/assets/images/new/paymentMethods.png similarity index 100% rename from assets/images/new/visa.png rename to assets/images/new/paymentMethods.png diff --git a/lib/config/config.dart b/lib/config/config.dart index f12c9191..126cb034 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -12,8 +12,8 @@ const PACKAGES_PRODUCTS = '/api/products'; const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_ORDERS = '/api/orders'; -// 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/models/Appointments/AppoimentAllHistoryResultList.dart b/lib/models/Appointments/AppoimentAllHistoryResultList.dart index 045f759e..f14e23d0 100644 --- a/lib/models/Appointments/AppoimentAllHistoryResultList.dart +++ b/lib/models/Appointments/AppoimentAllHistoryResultList.dart @@ -39,6 +39,7 @@ class AppoitmentAllHistoryResultList { String doctorImageURL; String doctorNameObj; int doctorRate; + double decimalDoctorRate; List doctorSpeciality; String doctorTitle; int gender; @@ -108,6 +109,7 @@ class AppoitmentAllHistoryResultList { this.doctorImageURL, this.doctorNameObj, this.doctorRate, + this.decimalDoctorRate, this.doctorSpeciality, this.doctorTitle, this.gender, @@ -176,6 +178,7 @@ class AppoitmentAllHistoryResultList { doctorImageURL = json['DoctorImageURL']; doctorNameObj = json['DoctorNameObj']; doctorRate = json['DoctorRate']; + decimalDoctorRate = json['DecimalDoctorRate']; doctorSpeciality = json['DoctorSpeciality'] != null ? json['DoctorSpeciality'].cast() : ["null"]; @@ -250,6 +253,7 @@ class AppoitmentAllHistoryResultList { data['DoctorImageURL'] = this.doctorImageURL; data['DoctorNameObj'] = this.doctorNameObj; data['DoctorRate'] = this.doctorRate; + data['DecimalDoctorRate'] = this.decimalDoctorRate; data['DoctorSpeciality'] = this.doctorSpeciality; data['DoctorTitle'] = this.doctorTitle; data['Gender'] = this.gender; diff --git a/lib/models/Appointments/DoctorProfile.dart b/lib/models/Appointments/DoctorProfile.dart index 9b2bc8e9..df6031a7 100644 --- a/lib/models/Appointments/DoctorProfile.dart +++ b/lib/models/Appointments/DoctorProfile.dart @@ -35,6 +35,7 @@ class DoctorProfileList { int actualDoctorRate; String doctorImageURL; int doctorRate; + double decimalDoctorRate; String doctorTitleForProfile; bool isAppointmentAllowed; String nationalityFlagURL; @@ -79,6 +80,7 @@ class DoctorProfileList { this.actualDoctorRate, this.doctorImageURL, this.doctorRate, + this.decimalDoctorRate, this.doctorTitleForProfile, this.isAppointmentAllowed, this.nationalityFlagURL, @@ -123,6 +125,7 @@ class DoctorProfileList { actualDoctorRate = json['ActualDoctorRate']; doctorImageURL = json['DoctorImageURL']; doctorRate = json['DoctorRate']; + decimalDoctorRate = json['DecimalDoctorRate']; doctorTitleForProfile = json['DoctorTitleForProfile']; isAppointmentAllowed = json['IsAppointmentAllowed']; nationalityFlagURL = json['NationalityFlagURL']; @@ -169,6 +172,7 @@ class DoctorProfileList { data['ActualDoctorRate'] = this.actualDoctorRate; data['DoctorImageURL'] = this.doctorImageURL; data['DoctorRate'] = this.doctorRate; + data['DecimalDoctorRate'] = this.decimalDoctorRate; data['DoctorTitleForProfile'] = this.doctorTitleForProfile; data['IsAppointmentAllowed'] = this.isAppointmentAllowed; data['NationalityFlagURL'] = this.nationalityFlagURL; diff --git a/lib/models/header_model.dart b/lib/models/header_model.dart index b1da8b17..1f4d14fc 100644 --- a/lib/models/header_model.dart +++ b/lib/models/header_model.dart @@ -11,8 +11,9 @@ class HeaderModel { int doctorRate; int actualDoctorRate; int totalReviews; + String decimalDoctorRate; String email; HeaderModel(this.doctorName, this.doctorId, this.doctorImageURL, this.speciality, this.invoiceNo, this.projectName, this.date, this.time, this.nationalityFlagURL, this.doctorRate, - this.actualDoctorRate, this.totalReviews, this.email); + this.actualDoctorRate, this.totalReviews, this.email, {this.decimalDoctorRate = null}); } diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart index e71fa02b..5c2cb113 100644 --- a/lib/pages/BookAppointment/DoctorProfile.dart +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -115,6 +115,7 @@ class _DoctorProfileState extends State with TickerProviderStateM widget.doctor.actualDoctorRate, widget.docProfileList.noOfPatientsRate, "", + decimalDoctorRate: widget.docProfileList.decimalDoctorRate.toString(), ), buttonIcon: 'assets/images/new/Boo_ Appointment.svg', showConfirmMessageDialog: false, diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index be44855d..57e2ea3b 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -106,6 +106,7 @@ class _AppointmentDetailsState extends State with SingleTick widget.appo.actualDoctorRate, widget.appo.noOfPatientsRate, "", + decimalDoctorRate: widget.appo.decimalDoctorRate.toString() //model.user.emailAddress, ), isNeedToShowButton: (widget.appo.clinicID == 17 || widget.appo.clinicID == 47 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) ? false : true, @@ -326,12 +327,10 @@ class _AppointmentDetailsState extends State with SingleTick child: Column( children: [ Container( - alignment: Alignment.center, width: MediaQuery.of(context).size.width, - color: Theme.of(context).primaryColor, margin: EdgeInsets.only(bottom: 5.0), padding: EdgeInsets.all(10.0), - child: Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.white))), + child: Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.black))), Container(margin: EdgeInsets.only(top: 0.0), child: Text(this.widget.appo.actualDoctorRate.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black))), Container( margin: EdgeInsets.only(top: 5.0), diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index 669e14f9..c6807ebb 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -53,7 +53,7 @@ class _HomePageFragment2State extends State { hmgServices.clear(); hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin)); - hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/visa.png", isLogin)); + hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergency, TranslationBase.of(context).services2, "assets/images/new/emergency.svg", isLogin)); diff --git a/lib/widgets/new_design/doctor_header.dart b/lib/widgets/new_design/doctor_header.dart index b3b7685a..a9cd0706 100644 --- a/lib/widgets/new_design/doctor_header.dart +++ b/lib/widgets/new_design/doctor_header.dart @@ -220,166 +220,228 @@ class DoctorHeader extends StatelessWidget { child: Dialog( child: Column( mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - // height: 400.0, width: MediaQuery.of(context).size.width * 0.8, color: Colors.white, child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - alignment: Alignment.center, width: MediaQuery.of(context).size.width, - color: Theme.of(context).primaryColor, - margin: EdgeInsets.only(bottom: 5.0), - padding: EdgeInsets.all(10.0), - child: Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.white))), - Container(margin: EdgeInsets.only(top: 0.0), child: Text(this.headerModel.actualDoctorRate.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black))), - Container( - margin: EdgeInsets.only(top: 5.0), - alignment: Alignment.center, - child: RatingBar.readOnly( - initialRating: this.headerModel.actualDoctorRate.toDouble(), - size: 35.0, - filledColor: Colors.yellow[700], - emptyColor: Colors.grey[500], - isHalfAllowed: true, - halfFilledIcon: Icons.star_half, - filledIcon: Icons.star, - emptyIcon: Icons.star, - ), + padding: EdgeInsets.all(20.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.black, fontWeight: FontWeight.w600, letterSpacing: -0.64)), + IconButton( + icon: Icon( + Icons.close, + color: Colors.black, + ), + onPressed: () { + Navigator.pop(context); + }, + ), + ], + )), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container(margin: EdgeInsets.only(left: 20.0), child: Text(this.headerModel.decimalDoctorRate != null ? this.headerModel.decimalDoctorRate : this.headerModel.actualDoctorRate.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black, fontWeight: FontWeight.bold))), + Container( + margin: EdgeInsets.symmetric(horizontal: 20.0), + child: RatingBar.readOnly( + initialRating: this.headerModel.actualDoctorRate.toDouble(), + size: 35.0, + filledColor: Colors.yellow[700], + emptyColor: Colors.grey[500], + isHalfAllowed: true, + halfFilledIcon: Icons.star_half, + filledIcon: Icons.star, + emptyIcon: Icons.star, + ), + ), + ], ), Container( - margin: EdgeInsets.only(top: 10.0), - child: Text(this.headerModel.totalReviews.toString() + " " + TranslationBase.of(context).reviews, style: TextStyle(fontSize: 14.0, color: Colors.black))), + margin: EdgeInsets.symmetric(horizontal: 20.0), + child: Text(this.headerModel.totalReviews.toString() + " " + TranslationBase.of(context).reviews, style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600))), Container( margin: EdgeInsets.only(top: 10.0), child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Container( - width: 100.0, - margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), - child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))), - Container( - margin: EdgeInsets.only(top: 10.0), - child: SizedBox( - width: getRatingWidth(doctorDetailsList[0].patientNumber), - height: 6.0, - child: Container( - color: Colors.green[700], + Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[0].patientNumber), + height: 6.0, + child: Container( + color: Colors.green[700], + ), + ), ), - ), + ], + ), + Container( + margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), + child: Text(getRatingWidth(doctorDetailsList[0].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), ], ), ), Container( child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Container( - width: 100.0, - margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), - child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black))), - Container( - margin: EdgeInsets.only(top: 10.0), - child: SizedBox( - width: getRatingWidth(doctorDetailsList[1].patientNumber), - height: 6.0, - child: Container( - color: Color(0xffB7B723), + Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[1].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffB7B723), + ), + ), ), - ), + ], + ), + Container( + margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), + child: Text(getRatingWidth(doctorDetailsList[1].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), ], ), ), Container( child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Container( - width: 100.0, - margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), - child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black))), - Container( - margin: EdgeInsets.only(top: 10.0), - child: SizedBox( - width: getRatingWidth(doctorDetailsList[2].patientNumber), - height: 6.0, - child: Container( - color: Color(0xffEBA727), + Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[2].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffEBA727), + ), + ), ), - ), + ], + ), + Container( + margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), + child: Text(getRatingWidth(doctorDetailsList[2].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), ], ), ), Container( child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Container( - width: 100.0, - margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), - child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black))), - Container( - margin: EdgeInsets.only(top: 10.0), - child: SizedBox( - width: getRatingWidth(doctorDetailsList[3].patientNumber), - height: 6.0, - child: Container( - color: Color(0xffEB7227), + Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[3].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffEB7227), + ), + ), ), - ), + ], + ), + Container( + margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), + child: Text(getRatingWidth(doctorDetailsList[3].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), ], ), ), Container( + margin: EdgeInsets.only(bottom: 30.0), child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Container( - width: 100.0, - margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), - child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black))), - Container( - margin: EdgeInsets.only(top: 10.0), - child: SizedBox( - width: getRatingWidth(doctorDetailsList[4].patientNumber), - height: 6.0, - child: Container( - color: Color(0xffE20C0C), + Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[4].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffE20C0C), + ), + ), ), - ), + ], ), - ], - ), - ), - Container(margin: EdgeInsets.only(top: 40.0), child: Divider()), - Container( - margin: EdgeInsets.only(top: 0.0), - child: Align( - alignment: FractionalOffset.bottomCenter, - child: ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ), - minWidth: MediaQuery.of(context).size.width, - height: 40.0, - child: RaisedButton( - elevation: 0.0, - color: Colors.white, - textColor: Colors.red, - hoverColor: Colors.transparent, - focusColor: Colors.transparent, - highlightColor: Colors.transparent, - disabledColor: new Color(0xFFbcc2c4), - onPressed: () { - Navigator.of(context).pop(); - }, - child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)), + Container( + margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), + child: Text(getRatingWidth(doctorDetailsList[4].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), - ), + ], ), ), + // Container(margin: EdgeInsets.only(top: 40.0), child: Divider()), + // Container( + // margin: EdgeInsets.only(top: 0.0), + // child: Align( + // alignment: FractionalOffset.bottomCenter, + // child: ButtonTheme( + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(10.0), + // ), + // minWidth: MediaQuery.of(context).size.width, + // height: 40.0, + // child: RaisedButton( + // elevation: 0.0, + // color: Colors.white, + // textColor: Colors.red, + // hoverColor: Colors.transparent, + // focusColor: Colors.transparent, + // highlightColor: Colors.transparent, + // disabledColor: new Color(0xFFbcc2c4), + // onPressed: () { + // Navigator.of(context).pop(); + // }, + // child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)), + // ), + // ), + // ), + // ), ], ), ), @@ -398,6 +460,6 @@ class DoctorHeader extends StatelessWidget { double getRatingWidth(int patientNumber) { var width = (patientNumber / this.headerModel.totalReviews) * 100; - return width; + return width.roundToDouble(); } }