Font changes, Updates & fixes
parent
fed6cf6784
commit
56f5151c0c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="40" height="40" rx="10" fill="#EFEFF0"/>
|
||||
<path d="M18.9994 9.25C16.0999 9.25 13.7494 11.6005 13.7494 14.5C13.7494 17.3995 16.0999 19.75 18.9994 19.75C21.8989 19.75 24.2494 17.3995 24.2494 14.5C24.2494 11.6005 21.8989 9.25 18.9994 9.25Z" fill="#8F9AA3"/>
|
||||
<path d="M22.4393 22.3825L22.4269 22.3899C22.3982 22.4063 22.3715 22.4164 22.3391 22.4232L22.3222 22.4264C21.5275 22.5747 20.3099 23.081 19.8772 24.4469C19.436 25.84 20.178 26.9751 20.7397 27.5414L20.9312 27.7346C21.045 27.8493 21.1019 27.9066 21.1231 27.9808C21.1442 28.055 21.1262 28.1337 21.09 28.2912L21.0601 28.4219C20.9887 28.7329 20.9096 29.2541 20.9862 29.8241C21.0509 30.3047 21.0832 30.545 20.9935 30.6475C20.9039 30.75 20.7005 30.75 20.2937 30.75L14.5901 30.75C12.7718 30.75 11.366 29.8556 10.1945 28.7396C9.51551 28.0927 9.17705 27.3646 9.26185 26.5888C9.3416 25.8592 9.78025 25.2637 10.2419 24.8118C10.9801 24.0893 12.0577 23.4813 12.7705 23.0792C12.9331 22.9875 13.0768 22.9064 13.1931 22.8372C14.4979 22.0602 15.93 21.5691 17.3945 21.3625C18.4583 21.2125 19.5401 21.2125 20.6039 21.3625C21.0835 21.4302 21.8204 21.628 22.365 21.7855C22.4184 21.801 22.4451 21.8087 22.4641 21.8172C22.6658 21.9073 22.7022 22.1856 22.5303 22.3244C22.5142 22.3375 22.4892 22.3525 22.4393 22.3825Z" fill="#8F9AA3"/>
|
||||
<path d="M27.3627 22.245C27.12 21.7533 26.67 21.25 25.9982 21.25C25.3273 21.25 24.8762 21.7522 24.6315 22.2431L23.9345 23.6487L23.9282 23.6547C23.9233 23.6592 23.9176 23.6639 23.9113 23.6687C23.9049 23.6734 23.8987 23.6775 23.893 23.681L23.8859 23.6851L22.6351 23.8946C22.0941 23.9855 21.5068 24.2757 21.3091 24.8998C21.1123 25.5211 21.4213 26.0967 21.8065 26.4851L22.7841 27.4708C22.7875 27.4778 22.792 27.4888 22.7959 27.5027C22.8003 27.5181 22.8024 27.5314 22.8031 27.5401L22.524 28.7572C22.397 29.3106 22.3883 30.0742 22.9815 30.5106C23.5783 30.9496 24.3047 30.7069 24.7916 30.4156L25.9668 29.7142C26.0142 29.6859 26.0283 29.702 26.0294 29.7135L27.2061 30.4159C27.6913 30.7048 28.4194 30.9516 29.0171 30.5123C29.6116 30.0753 29.5995 29.3093 29.4735 28.7579L29.1942 27.5401C29.1949 27.5314 29.197 27.5181 29.2014 27.5027C29.2053 27.4888 29.2098 27.4778 29.2132 27.4708L30.1889 26.487L30.1899 26.486C30.5775 26.0974 30.8877 25.521 30.6893 24.8985C30.4905 24.275 29.9028 23.9855 29.3626 23.8947L28.1075 23.6844L28.0992 23.6798C28.0935 23.6763 28.0874 23.6722 28.0811 23.6676C28.0789 23.6659 28.0766 23.6642 28.0745 23.6625C28.0709 23.6596 28.0675 23.6567 28.0645 23.654L28.0587 23.6484L27.3632 22.2459L27.3627 22.245Z" fill="#8F9AA3"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,30 @@
|
||||
class AppointmentRatedResponseModel {
|
||||
int? appointmentNo;
|
||||
int? clinicID;
|
||||
int? doctorID;
|
||||
bool? isAllowedToRate;
|
||||
bool? isAppointmentRated;
|
||||
int? projectID;
|
||||
|
||||
AppointmentRatedResponseModel({this.appointmentNo, this.clinicID, this.doctorID, this.isAllowedToRate, this.isAppointmentRated, this.projectID});
|
||||
|
||||
AppointmentRatedResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
clinicID = json['ClinicID'];
|
||||
doctorID = json['DoctorID'];
|
||||
isAllowedToRate = json['IsAllowedToRate'];
|
||||
isAppointmentRated = json['IsAppointmentRated'];
|
||||
projectID = json['ProjectID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['DoctorID'] = this.doctorID;
|
||||
data['IsAllowedToRate'] = this.isAllowedToRate;
|
||||
data['IsAppointmentRated'] = this.isAppointmentRated;
|
||||
data['ProjectID'] = this.projectID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,181 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_export.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/appointments/widgets/doctor_row_appointment_rating.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class AppointmentRatingWidget extends StatefulWidget {
|
||||
const AppointmentRatingWidget({super.key, required this.patientAppointmentHistoryResponseModel});
|
||||
|
||||
final PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel;
|
||||
|
||||
@override
|
||||
State<AppointmentRatingWidget> createState() => _AppointmentRatingWidgetState();
|
||||
}
|
||||
|
||||
class _AppointmentRatingWidgetState extends State<AppointmentRatingWidget> {
|
||||
late MyAppointmentsViewModel myAppointmentsViewModel;
|
||||
late BookAppointmentsViewModel bookAppointmentsViewModel;
|
||||
|
||||
int rating = 0;
|
||||
String notes = "";
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
myAppointmentsViewModel = Provider.of<MyAppointmentsViewModel>(context, listen: false);
|
||||
bookAppointmentsViewModel = Provider.of<BookAppointmentsViewModel>(context, listen: false);
|
||||
return SizedBox(
|
||||
height: MediaQuery.of(context).size.height * 0.6,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Scrollable main content
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 0.0, left: 0, right: 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
// Doctor row
|
||||
Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 24.r,
|
||||
hasShadow: false,
|
||||
),
|
||||
child: BuildDoctorRowAppointmentRating(
|
||||
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
|
||||
)),
|
||||
|
||||
SizedBox(height: 16),
|
||||
|
||||
// Rating box
|
||||
Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 24.r,
|
||||
hasShadow: false,
|
||||
),
|
||||
width: double.infinity,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
LocaleKeys.rateTheDoctor.tr(context: context).toText16(isBold: true),
|
||||
SizedBox(height: 12),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
...List.generate(
|
||||
5,
|
||||
(index) => AnimatedSwitcher(
|
||||
duration: Duration(milliseconds: 1000),
|
||||
switchInCurve: Curves.elasticOut,
|
||||
switchOutCurve: Curves.elasticIn,
|
||||
transitionBuilder: (Widget child, Animation<double> animation) {
|
||||
return ScaleTransition(child: child, scale: animation);
|
||||
},
|
||||
child: Container(
|
||||
key: ValueKey<int>(rating),
|
||||
child: IconButton(
|
||||
iconSize: 45.0,
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
rating = index + 1;
|
||||
});
|
||||
},
|
||||
color: rating >= (index + 1) ? Color.fromRGBO(255, 186, 0, 1.0) : Colors.grey[400],
|
||||
icon: Icon(rating >= (index + 1) ? Icons.star : Icons.star)),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(height: 12),
|
||||
|
||||
// Note text field
|
||||
Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 24.r,
|
||||
hasShadow: false,
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: TextField(
|
||||
maxLines: 4,
|
||||
decoration: InputDecoration.collapsed(
|
||||
hintText: LocaleKeys.notes.tr(context: context),
|
||||
hintStyle: TextStyle(fontSize: 16.f, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16)),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
notes = value;
|
||||
});
|
||||
},
|
||||
))),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
// Bottom action buttons pinned to bottom
|
||||
SafeArea(
|
||||
top: false,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CustomButton(
|
||||
text: LocaleKeys.later.tr(context: context),
|
||||
backgroundColor: Color(0xffFEE9EA),
|
||||
borderColor: Color(0xffFEE9EA),
|
||||
textColor: Color(0xffED1C2B),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: CustomButton(
|
||||
text: LocaleKeys.submit.tr(context: context),
|
||||
onPressed: () async {
|
||||
// Set up clinic rating and show clinic rating view
|
||||
// appointmentRatingViewModel!.setTitle(LocaleKeys.rateDoctor.tr(context: context),);
|
||||
// appointmentRatingViewModel!.setSubTitle(LocaleKeys.howWasYourLastVisitWithDoctor.tr(context: context),);
|
||||
// appointmentRatingViewModel!.setClinicOrDoctor(true);
|
||||
|
||||
LoaderBottomSheet.showLoader();
|
||||
await myAppointmentsViewModel.submitDoctorRating(docRate: rating, docNote: notes, patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel);
|
||||
// await appointmentRatingViewModel!.submitClinicRating(clinicRate: rating, clinicNote: note);
|
||||
LoaderBottomSheet.hideLoader();
|
||||
Navigator.pop(context);
|
||||
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/appointment_details_resp_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
||||
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
class BuildDoctorRowAppointmentRating extends StatelessWidget {
|
||||
final PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel;
|
||||
|
||||
BuildDoctorRowAppointmentRating({super.key, required this.patientAppointmentHistoryResponseModel});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Image.network(
|
||||
patientAppointmentHistoryResponseModel.doctorImageURL!,
|
||||
width: 63.h,
|
||||
height: 63.h,
|
||||
fit: BoxFit.cover,
|
||||
).circle(100),
|
||||
SizedBox(width: 16.h),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
patientAppointmentHistoryResponseModel.doctorNameObj!.toString().toText16(isBold: true, maxlines: 1),
|
||||
SizedBox(height: 8.h),
|
||||
Wrap(
|
||||
direction: Axis.horizontal,
|
||||
spacing: 3.h,
|
||||
runSpacing: 4.h,
|
||||
children: [
|
||||
AppCustomChipWidget(
|
||||
labelText: patientAppointmentHistoryResponseModel.projectName.toString(),
|
||||
),
|
||||
AppCustomChipWidget(
|
||||
labelText: patientAppointmentHistoryResponseModel.clinicName.toString(),
|
||||
),
|
||||
Directionality(
|
||||
textDirection: ui.TextDirection.ltr,
|
||||
child: AppCustomChipWidget(
|
||||
labelPadding: EdgeInsetsDirectional.only(start: -8.w, end: 6.w),
|
||||
icon: AppAssets.ic_date_filter,
|
||||
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false),
|
||||
isEnglishOnly: true,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue