Dr speciality translation fix

dev_v3.13.6
haroon amjad 2 months ago
parent 43741e24cf
commit 8838eb4769

@ -41,6 +41,7 @@ class DoctorList {
dynamic serviceID;
String? setupID;
List<String>? speciality;
List<String>? specialityN;
dynamic workingHours;
dynamic decimalDoctorRate;
@ -87,6 +88,7 @@ class DoctorList {
this.serviceID,
this.setupID,
this.speciality,
this.specialityN,
this.workingHours,
this.decimalDoctorRate});
@ -133,6 +135,7 @@ class DoctorList {
serviceID = json['ServiceID'];
setupID = json['SetupID'];
if (json.containsKey('Speciality') && json['Speciality'] != null) speciality = json['Speciality'].cast<String>();
if (json.containsKey('SpecialityN') && json['SpecialityN'] != null) specialityN = json['SpecialityN'].cast<String>();
workingHours = json['WorkingHours'];
decimalDoctorRate = json['DecimalDoctorRate'];
}
@ -180,6 +183,7 @@ class DoctorList {
data['ServiceID'] = this.serviceID;
data['SetupID'] = this.setupID;
data['Speciality'] = this.speciality;
data['SpecialityN'] = this.specialityN;
data['WorkingHours'] = this.workingHours;
data['DecimalDoctorRate'] = this.decimalDoctorRate;
return data;

@ -36,7 +36,7 @@ class DoctorView extends StatefulWidget {
DoctorView(
{required this.doctor,
this.isLiveCareAppointment,
this.isLiveCareAppointment,
this.isObGyneAppointment = false,
this.isDoctorNameSearch = false,
this.isContinueDentalPlan = false,
@ -50,7 +50,6 @@ class DoctorView extends StatefulWidget {
}
class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMixin {
late ProjectViewModel projectViewModel;
@override
@ -99,10 +98,12 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
),
widget.isShowDate ? Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctor.date)),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
) : Container(),
widget.isShowDate
? Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctor.date)),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
)
: Container(),
],
),
if (widget.doctor.doctorTitle != null) SizedBox(height: 6),
@ -123,12 +124,20 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
children: <Widget>[
if (widget.doctor.clinicName != null) MyRichText(TranslationBase.of(context).clinic + ":", widget.doctor.clinicName!, context.read<ProjectViewModel>().isArabic),
if (widget.doctor.projectName != null) MyRichText(TranslationBase.of(context).branch, widget.doctor.projectName!, context.read<ProjectViewModel>().isArabic),
if (widget.doctor.speciality != null && widget.doctor.speciality!.length > 0)
Text(
this.widget.doctor.speciality![0].trim(),
// getDoctorSpeciality(this.doctor.speciality).trim(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
if (!projectViewModel.isArabic)
if (widget.doctor.speciality != null && widget.doctor.speciality!.length > 0)
Text(
this.widget.doctor.speciality![0].trim(),
// getDoctorSpeciality(this.doctor.speciality).trim(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
if (projectViewModel.isArabic)
if (widget.doctor.specialityN != null && widget.doctor.specialityN!.length > 0)
Text(
this.widget.doctor.specialityN![0].trim(),
// getDoctorSpeciality(this.doctor.speciality).trim(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
if (widget.doctor.nearestFreeSlot != null)
Text(
getDate(widget.doctor.nearestFreeSlot),
@ -147,9 +156,18 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
itemSize: 20,
ignoreGestures: true,
ratingWidget: RatingWidget(
full: Icon(Icons.star, color: CustomColors.accentColor,),
half: Icon(Icons.star_half, color: CustomColors.accentColor,),
empty: Icon(Icons.star, color: CustomColors.accentColor,),
full: Icon(
Icons.star,
color: CustomColors.accentColor,
),
half: Icon(
Icons.star_half,
color: CustomColors.accentColor,
),
empty: Icon(
Icons.star,
color: CustomColors.accentColor,
),
),
tapOnlyMode: true,
itemPadding: EdgeInsets.symmetric(horizontal: 4.0),
@ -267,8 +285,14 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
}
void next(BuildContext context) {
Navigator.push(context,
FadePage(page: ObGyneTimeSlots(projectID: widget.doctor.projectID!, selectedClinicID: widget.doctor.clinicID!, selectedDoctorID: widget.doctor.doctorID!, obGyneProcedureListResponse: widget.obGyneProcedureListResponse!)));
Navigator.push(
context,
FadePage(
page: ObGyneTimeSlots(
projectID: widget.doctor.projectID!,
selectedClinicID: widget.doctor.clinicID!,
selectedDoctorID: widget.doctor.doctorID!,
obGyneProcedureListResponse: widget.obGyneProcedureListResponse!)));
}
Future navigateToDoctorProfile(context, docObject, docProfile, {isAppo, bool isContinueDentalPlan = false}) async {

Loading…
Cancel
Save