|
|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
import 'dart:convert';
|
|
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/models/doctor_profile_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:http/http.dart';
|
|
|
|
|
@ -18,7 +20,7 @@ class ScheduleProvider with ChangeNotifier {
|
|
|
|
|
bool isLoading = true;
|
|
|
|
|
bool isError = false;
|
|
|
|
|
String error = '';
|
|
|
|
|
RequestSchedule requestSchedule = RequestSchedule(15, 1, 70907, 7, 2, '2020-04-22T11:25:57.640Z', '11.11.11.11', 1.2, 9, '2lMDFT8U+Uy5jxRzCO8n2w==', 'vV6tg9yyVJ222', true, false, 1);
|
|
|
|
|
RequestSchedule requestSchedule = RequestSchedule(15, 1, 1485, 7, 2, '2020-04-22T11:25:57.640Z', '11.11.11.11', 1.2, 9, '2lMDFT8U+Uy5jxRzCO8n2w==', 'vV6tg9yyVJ222', true, false, 1);
|
|
|
|
|
|
|
|
|
|
ScheduleProvider() {
|
|
|
|
|
getDoctorSchedule();
|
|
|
|
|
@ -26,6 +28,13 @@ class ScheduleProvider with ChangeNotifier {
|
|
|
|
|
|
|
|
|
|
getDoctorSchedule() async {
|
|
|
|
|
const url = BASE_URL + 'Doctors.svc/REST/GetDoctorWorkingHoursTable';
|
|
|
|
|
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.clinicID = doctorProfile.clinicID;
|
|
|
|
|
requestSchedule.tokenID = token;
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
if (await Helpers.checkConnection()) {
|
|
|
|
|
|