|
|
|
@ -8,7 +8,7 @@ import 'package:http_interceptor/http_client_with_interceptor.dart';
|
|
|
|
|
|
|
|
|
|
import '../interceptor/http_interceptor.dart';
|
|
|
|
|
import '../models/list_doctor_working_hours_table_model.dart';
|
|
|
|
|
import '../models/ScheduleRequest.dart';
|
|
|
|
|
import '../models/RequestSchedule.dart';
|
|
|
|
|
|
|
|
|
|
class ScheduleProvider with ChangeNotifier {
|
|
|
|
|
Client client =
|
|
|
|
@ -18,7 +18,7 @@ class ScheduleProvider with ChangeNotifier {
|
|
|
|
|
bool isLoading = true;
|
|
|
|
|
bool isError = false;
|
|
|
|
|
String error = '';
|
|
|
|
|
ScheduleRequest scheduleRequest = ScheduleRequest(
|
|
|
|
|
RequestSchedule requestSchedule = RequestSchedule(
|
|
|
|
|
15,
|
|
|
|
|
1,
|
|
|
|
|
70907,
|
|
|
|
@ -42,7 +42,7 @@ class ScheduleProvider with ChangeNotifier {
|
|
|
|
|
const url = BASE_URL + 'Doctors.svc/REST/GetDoctorWorkingHoursTable';
|
|
|
|
|
try {
|
|
|
|
|
if (await Helpers.checkConnection()) {
|
|
|
|
|
final response = await client.post(url, body: json.encode(scheduleRequest.toJson()));
|
|
|
|
|
final response = await client.post(url, body: json.encode(requestSchedule.toJson()));
|
|
|
|
|
final int statusCode = response.statusCode;
|
|
|
|
|
if (statusCode < 200 || statusCode >= 400 || json == null) {
|
|
|
|
|
isLoading = false;
|
|
|
|
|