|
|
@ -17,12 +17,11 @@ class AuthProvider with ChangeNotifier {
|
|
|
|
bool isLoading = true;
|
|
|
|
bool isLoading = true;
|
|
|
|
DoctorProfileModel doctorProfile;
|
|
|
|
DoctorProfileModel doctorProfile;
|
|
|
|
BaseAppClient baseAppClient = BaseAppClient();
|
|
|
|
BaseAppClient baseAppClient = BaseAppClient();
|
|
|
|
setDoctorProfile(DoctorProfileModel profileModel){
|
|
|
|
setDoctorProfile(DoctorProfileModel profileModel) {
|
|
|
|
doctorProfile = profileModel;
|
|
|
|
doctorProfile = profileModel;
|
|
|
|
notifyListeners();
|
|
|
|
notifyListeners();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AuthProvider() {
|
|
|
|
AuthProvider() {
|
|
|
|
getUserAuthentication();
|
|
|
|
getUserAuthentication();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -154,7 +153,8 @@ class AuthProvider with ChangeNotifier {
|
|
|
|
await baseAppClient.post(GET_DOC_PROFILES,
|
|
|
|
await baseAppClient.post(GET_DOC_PROFILES,
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
localRes = response;
|
|
|
|
localRes = response;
|
|
|
|
doctorProfile = DoctorProfileModel.fromJson(response['DoctorProfileList'][0]);
|
|
|
|
doctorProfile =
|
|
|
|
|
|
|
|
DoctorProfileModel.fromJson(response['DoctorProfileList'][0]);
|
|
|
|
selectedClinicName =
|
|
|
|
selectedClinicName =
|
|
|
|
response['DoctorProfileList'][0]['ClinicDescription'];
|
|
|
|
response['DoctorProfileList'][0]['ClinicDescription'];
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
@ -167,4 +167,21 @@ class AuthProvider with ChangeNotifier {
|
|
|
|
throw error;
|
|
|
|
throw error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<dynamic> getDashboard(docInfo) async {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
dynamic localRes;
|
|
|
|
|
|
|
|
await baseAppClient.post(GET_DASHBOARD,
|
|
|
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
|
|
|
localRes = response;
|
|
|
|
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
|
|
|
|
throw error;
|
|
|
|
|
|
|
|
}, body: {"DoctorID": docInfo.doctorID});
|
|
|
|
|
|
|
|
notifyListeners();
|
|
|
|
|
|
|
|
return Future.value(localRes);
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
|
|
print(error);
|
|
|
|
|
|
|
|
throw error;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|