get projects setup id code updated.

update_flutter_3.16.0
Sultan Khan 9 months ago
parent 0268b796fe
commit f40adfb087

@ -29,7 +29,9 @@ class BaseAppClient {
required Function(String error, int statusCode) onFailure, required Function(String error, int statusCode) onFailure,
bool isAllowAny = false, bool isAllowAny = false,
bool isLiveCare = false, bool isLiveCare = false,
bool isFallLanguage = false}) async { bool isFallLanguage = false,
bool isCustomRequest = false
}) async {
String url; String url;
if (isLiveCare) if (isLiveCare)
url = BASE_URL_LIVE_CARE + endPoint; url = BASE_URL_LIVE_CARE + endPoint;
@ -40,7 +42,7 @@ class BaseAppClient {
try { try {
Map<String, dynamic>? profile = await sharedPref.getObj(DOCTOR_PROFILE); Map<String, dynamic>? profile = await sharedPref.getObj(DOCTOR_PROFILE);
String? token = await sharedPref.getString(TOKEN); String? token = await sharedPref.getString(TOKEN);
if(!isCustomRequest) {
if (profile != null) { if (profile != null) {
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
if (body == null || body['DoctorID'] == null) { if (body == null || body['DoctorID'] == null) {
@ -118,6 +120,7 @@ class BaseAppClient {
if (body['SetupID'] != null) { if (body['SetupID'] != null) {
body['SetupID'] = body['SetupID'].trim(); body['SetupID'] = body['SetupID'].trim();
} }
}
// body['ClinicID'] = 501; // body['ClinicID'] = 501;
// body['ProjectID'] = 12; // body['ProjectID'] = 12;
@ -134,7 +137,7 @@ class BaseAppClient {
final response = await http.post(Uri.parse(url), body: json.encode(body), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}); final response = await http.post(Uri.parse(url), body: json.encode(body), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'});
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
if (body['DoctorID'] != null) { if (body!['DoctorID'] != null) {
postRequestAndResponse( postRequestAndResponse(
doctorId: body['DoctorID'], doctorId: body['DoctorID'],
completeUrl: url, completeUrl: url,

@ -29,7 +29,8 @@ class HospitalsService extends BaseService {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, },
body: {"LanguageID":await sharedPref.getString(APP_Language),"MemberID":getHospitalsRequestModel.memberID,"DoctorID":getHospitalsRequestModel.doctorID} //getHospitalsRequestModel.toJson(), body: {"LanguageID":2,"MemberID":getHospitalsRequestModel.memberID,"DoctorID":getHospitalsRequestModel.doctorID}, //getHospitalsRequestModel.toJson(),
isCustomRequest: true
); );
} }
} }

Loading…
Cancel
Save