change name in Doctor Reply

merge-requests/66/head
her_username 6 years ago
parent f3102ef99f
commit 80fdd81ae0

@ -20,24 +20,24 @@ class DoctorReplyProvider with ChangeNotifier {
bool isLoading = true;
bool isError = false;
String error = '';
RequestDoctorReply _requestSchedule = RequestDoctorReply();
RequestDoctorReply _requestDoctorReply = RequestDoctorReply();
DoctorReplyProvider() {
getDoctorSchedule();
getDoctorReply();
}
getDoctorSchedule() async {
getDoctorReply() async {
const url = BASE_URL + 'DoctorApplication.svc/REST/GtMyPatientsQuestions';
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
_requestSchedule.doctorID = doctorProfile.doctorID;
_requestSchedule.projectID = doctorProfile.projectID;
_requestSchedule.tokenID = token;
_requestDoctorReply.doctorID = doctorProfile.doctorID;
_requestDoctorReply.projectID = doctorProfile.projectID;
_requestDoctorReply.tokenID = token;
try {
if (await Helpers.checkConnection()) {
final response = await client.post(url,
body: json.encode(_requestSchedule.toJson()));
body: json.encode(_requestDoctorReply.toJson()));
final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400 || json == null) {
isLoading = false;

@ -1,6 +1,7 @@
import 'package:barcode_scan/platform_wrapper.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart';
@ -153,6 +154,14 @@ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
patientList = [];
});
String token = await sharedPref.getString(TOKEN);
// Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
// DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile);
// patient.PatientID = 8808;
// patient.TokenID = token;
// patient.setDoctorID = doctorProfile.projectID;
// patient.setClinicID = doctorProfile.clinicID;
// patient.setProjectID = doctorProfile.projectID;
// Provider.of<PatientsProvider>(context, listen: false);
patient.PatientID = 8808;
patient.TokenID = token;
Provider.of<PatientsProvider>(context, listen: false)

Loading…
Cancel
Save