|
|
|
|
@ -1,4 +1,6 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/locator.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCardView.dart';
|
|
|
|
|
@ -34,13 +36,13 @@ class _MyAppointmentsState extends State<MyAppointments>
|
|
|
|
|
|
|
|
|
|
bool isDataLoaded = false;
|
|
|
|
|
var sharedPref = new AppSharedPreferences();
|
|
|
|
|
var authProvider = new AuthProvider();
|
|
|
|
|
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
_tabController = new TabController(length: 3, vsync: this);
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
|
if (authProvider.isLogin) getPatientAppointmentHistory();
|
|
|
|
|
if (authenticatedUserObject.isLogin) getPatientAppointmentHistory();
|
|
|
|
|
});
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
@ -87,6 +89,11 @@ class _MyAppointmentsState extends State<MyAppointments>
|
|
|
|
|
widget.bookedAppoList.clear();
|
|
|
|
|
widget.confirmedAppoList.clear();
|
|
|
|
|
widget.arrivedAppoList.clear();
|
|
|
|
|
|
|
|
|
|
widget._patientBookedAppointmentListHospital.clear();
|
|
|
|
|
widget._patientConfirmedAppointmentListHospital.clear();
|
|
|
|
|
widget._patientArrivedAppointmentListHospital.clear();
|
|
|
|
|
|
|
|
|
|
service.getPatientAppointmentHistory(false, context).then((res) {
|
|
|
|
|
print(res['AppoimentAllHistoryResultList'].length);
|
|
|
|
|
if (res['MessageStatus'] == 1) {
|
|
|
|
|
|