add base url and change the mobile number to mine

merge-requests/21/head
Elham Rababah 6 years ago
parent 12217d21ac
commit c38af9da48

@ -1 +1,2 @@
const MAX_SMALL_SCREEN = 660; const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://hmgwebservices.com/Services/';

@ -1,23 +1,25 @@
import 'dart:convert'; import 'dart:convert';
import 'package:doctor_app_flutter/interceptor/http_interceptor.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:http/http.dart'; import 'package:http/http.dart';
import 'package:http_interceptor/http_client_with_interceptor.dart'; import 'package:http_interceptor/http_client_with_interceptor.dart';
import '../config/config.dart';
import '../interceptor/http_interceptor.dart';
import '../models/user_model.dart'; import '../models/user_model.dart';
const LOGIN_URL = const LOGIN_URL = BASE_URL + 'Sentry.svc/REST/MemberLogIN_New';
'https://hmgwebservices.com/Services/Sentry.svc/REST/MemberLogIN_New';
const INSERT_DEVICE_IMEI = const INSERT_DEVICE_IMEI =
'https://hmgwebservices.com/Services/Sentry.svc/REST/DoctorApplication_INSERTDeviceIMEI'; BASE_URL + 'Sentry.svc/REST/DoctorApplication_INSERTDeviceIMEI';
const SELECT_DEVICE_IMEI = const SELECT_DEVICE_IMEI =
'https://hmgwebservices.com/Services/Sentry.svc/REST/DoctorApplication_SELECTDeviceIMEIbyIMEI'; BASE_URL + 'Sentry.svc/REST/DoctorApplication_SELECTDeviceIMEIbyIMEI';
const SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE = const SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE = BASE_URL +
'https://hmgwebservices.com/Services/Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType'; 'Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType';
const MEMBER_CHECK_ACTIVATION_CODE_NEW =
BASE_URL + 'Sentry.svc/REST/MemberCheckActivationCode_New';
const MEMBER_CHECK_ACTIVATION_CODE_NEW ='https://hmgwebservices.com/Services/Sentry.svc/REST/MemberCheckActivationCode_New';
class AuthProvider with ChangeNotifier { class AuthProvider with ChangeNotifier {
Client client = Client client =
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]); HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
@ -68,11 +70,13 @@ class AuthProvider with ChangeNotifier {
} }
} }
Future<Map> sendActivationCodeByOtpNotificationType(activationCodeModel) async{ Future<Map> sendActivationCodeByOtpNotificationType(
activationCodeModel) async {
const url = SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE; const url = SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE;
try { try {
final response = await client.post(url, body: json.encode(activationCodeModel)); final response =
await client.post(url, body: json.encode(activationCodeModel));
return Future.value(json.decode(response.body)); return Future.value(json.decode(response.body));
} catch (error) { } catch (error) {
print(error); print(error);
@ -80,11 +84,12 @@ class AuthProvider with ChangeNotifier {
} }
} }
Future<Map> memberCheckActivationCodeNew(activationCodeModel) async{ Future<Map> memberCheckActivationCodeNew(activationCodeModel) async {
const url = MEMBER_CHECK_ACTIVATION_CODE_NEW; const url = MEMBER_CHECK_ACTIVATION_CODE_NEW;
try { try {
final response = await client.post(url, body: json.encode(activationCodeModel)); final response =
await client.post(url, body: json.encode(activationCodeModel));
return Future.value(json.decode(response.body)); return Future.value(json.decode(response.body));
} catch (error) { } catch (error) {
print(error); print(error);

@ -1,5 +1,6 @@
import 'dart:convert'; import 'dart:convert';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:http/http.dart'; import 'package:http/http.dart';
import 'package:http_interceptor/http_client_with_interceptor.dart'; import 'package:http_interceptor/http_client_with_interceptor.dart';
@ -12,7 +13,8 @@ class PatientsProvider with ChangeNotifier {
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]); HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
Future<Map> getPatientList(PatientModel patient, patientType) async { Future<Map> getPatientList(PatientModel patient, patientType) async {
const url = const url =
'https://hmgwebservices.com/Services/DoctorApplication.svc/REST/GetMyInPatient'; BASE_URL+'DoctorApplication.svc/REST/GetMyInPatient';
try { try {
final response = await client.post(url, final response = await client.post(url,
body: json.encode({ body: json.encode({

@ -1,12 +1,14 @@
import 'dart:convert'; import 'dart:convert';
import 'package:doctor_app_flutter/config/config.dart';
import '../interceptor/http_interceptor.dart'; import '../interceptor/http_interceptor.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:http/http.dart'; import 'package:http/http.dart';
import 'package:http_interceptor/http_client_with_interceptor.dart'; import 'package:http_interceptor/http_client_with_interceptor.dart';
const GET_PROJECTS = const GET_PROJECTS =
'https://hmgwebservices.com/Services/Lists.svc/REST/GetProjectForDoctorAPP'; BASE_URL+'Lists.svc/REST/GetProjectForDoctorAPP';
class ProjectsProvider with ChangeNotifier { class ProjectsProvider with ChangeNotifier {
Client client = Client client =

@ -180,11 +180,11 @@ class _VerificationMethodsState extends State<VerificationMethods> {
Map model = { Map model = {
"LogInTokenID": _loggedUser['LogInTokenID'], "LogInTokenID": _loggedUser['LogInTokenID'],
"Channel": 9, "Channel": 9,
"MobileNumber": _loggedUser['MobileNumber'],//785228065, "MobileNumber": 785228065,//_loggedUser['MobileNumber'],
"IPAdress": "11.11.11.11", "IPAdress": "11.11.11.11",
"LanguageID": 2, "LanguageID": 2,
"ProjectID": 15, //TODO : this should become daynamci "ProjectID": 15, //TODO : this should become daynamci
"ZipCode": _loggedUser['ZipCode'],//962, //_loggedUser['ZipCode'], "ZipCode": 962, //_loggedUser['ZipCode'],
"UserName": _loggedUser['List_MemberInformation'][0]['MemberID'], "UserName": _loggedUser['List_MemberInformation'][0]['MemberID'],
"OTP_SendType": oTPSendType "OTP_SendType": oTPSendType
}; };

Loading…
Cancel
Save