|
|
|
|
@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/routes.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
|
@ -513,6 +514,9 @@ class _BookConfirmState extends State<BookConfirm> {
|
|
|
|
|
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
|
|
|
|
|
navigateToBookSuccess(context, docObject, widget.patientShareResponse);
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
AppToast.showErrorToast(message: err);
|
|
|
|
|
navigateToHome(context);
|
|
|
|
|
print(err);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -528,6 +532,9 @@ class _BookConfirmState extends State<BookConfirm> {
|
|
|
|
|
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
|
|
|
|
|
navigateToBookSuccess(context, docObject, widget.patientShareResponse);
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
AppToast.showErrorToast(message: err);
|
|
|
|
|
navigateToHome(context);
|
|
|
|
|
print(err);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -584,6 +591,10 @@ class _BookConfirmState extends State<BookConfirm> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future navigateToHome(context) async {
|
|
|
|
|
Navigator.of(context).popAndPushNamed(HOME);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future navigateToBookSuccess(context, DoctorList docObject,
|
|
|
|
|
PatientShareResponse patientShareResponse) async {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|