|
|
|
@ -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 {
|
|
|
|
|