|
|
|
|
@ -24,10 +24,7 @@ class DocAvailableAppointments extends StatefulWidget {
|
|
|
|
|
static String selectedTime;
|
|
|
|
|
bool isLiveCareAppointment;
|
|
|
|
|
final dynamic doctorSchedule;
|
|
|
|
|
DocAvailableAppointments(
|
|
|
|
|
{@required this.doctor,
|
|
|
|
|
this.doctorSchedule,
|
|
|
|
|
@required this.isLiveCareAppointment});
|
|
|
|
|
DocAvailableAppointments({@required this.doctor, this.doctorSchedule, @required this.isLiveCareAppointment});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_DocAvailableAppointmentsState createState() => _DocAvailableAppointmentsState();
|
|
|
|
|
@ -55,6 +52,15 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
|
|
|
|
|
|
|
|
|
|
var language;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void didUpdateWidget(covariant DocAvailableAppointments oldWidget) {
|
|
|
|
|
if (oldWidget.doctorSchedule != widget.doctorSchedule) {
|
|
|
|
|
_calendarController.setSelectedDay(DateUtil.convertStringToDate(widget.doctorSchedule['Date']), isProgrammatic: true);
|
|
|
|
|
_onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date']), List());
|
|
|
|
|
}
|
|
|
|
|
super.didUpdateWidget(oldWidget);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
// TODO: implement initState
|
|
|
|
|
@ -345,14 +351,8 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
|
|
|
|
|
_events = value,
|
|
|
|
|
if (widget.doctorSchedule != null)
|
|
|
|
|
{
|
|
|
|
|
_calendarController.setSelectedDay(
|
|
|
|
|
DateUtil.convertStringToDate(
|
|
|
|
|
widget.doctorSchedule['Date']),
|
|
|
|
|
isProgrammatic: true),
|
|
|
|
|
_onDaySelected(
|
|
|
|
|
DateUtil.convertStringToDate(
|
|
|
|
|
widget.doctorSchedule['Date']),
|
|
|
|
|
List())
|
|
|
|
|
_calendarController.setSelectedDay(DateUtil.convertStringToDate(widget.doctorSchedule['Date']), isProgrammatic: true),
|
|
|
|
|
_onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date']), List())
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|