Merge branch 'elham' into 'master'

add base url and change the mobile number to mine

See merge request Cloud_Solution/doctor_app_flutter!21
merge-requests/23/merge
Elham 6 years ago
commit dcf2d3aa3c

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

@ -1,10 +1,8 @@
import 'dart:convert';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/providers/auth_provider.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:http_interceptor/http_interceptor.dart'; import 'package:http_interceptor/http_interceptor.dart';
import '../providers/auth_provider.dart';
import '../util/dr_app_shared_pref.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
List<String> publicUrls = [ List<String> publicUrls = [
LOGIN_URL, LOGIN_URL,
@ -17,7 +15,6 @@ class HttpInterceptor extends InterceptorContract {
Future<RequestData> interceptRequest({RequestData data}) async { Future<RequestData> interceptRequest({RequestData data}) async {
// print('RequestData ${data.body}'); // print('RequestData ${data.body}');
try { try {
print({data.headers});
data.headers["Content-Type"] = "application/json"; data.headers["Content-Type"] = "application/json";
data.headers["Accept"] = "application/json"; data.headers["Accept"] = "application/json";
// if (publicUrls.contains(data.url)) { // if (publicUrls.contains(data.url)) {

@ -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 =

@ -1,7 +1,8 @@
import 'package:doctor_app_flutter/widgets/patients/profile/patinet_profile_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../widgets/patients/profile/patient_profile_widget.dart';
import '../../widgets/shared/app_scaffold_widget.dart';
class PatientProfileScreen extends StatelessWidget { class PatientProfileScreen extends StatelessWidget {
const PatientProfileScreen({Key key}) : super(key: key); const PatientProfileScreen({Key key}) : super(key: key);

@ -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
}; };

@ -3,6 +3,14 @@ import 'package:flutter/material.dart';
import './profile_general_info_content_widget.dart'; import './profile_general_info_content_widget.dart';
import '../../../config/size_config.dart'; import '../../../config/size_config.dart';
import '../../shared/rounded_container_widget.dart'; import '../../shared/rounded_container_widget.dart';
/*
*@author: Elham Rababah
*@Date:21/4/2020
*@param:
*@return: ProfileGeneralInfoWidget
*@desc: Profile General Info Widget class
*/
class ProfileGeneralInfoWidget extends StatelessWidget { class ProfileGeneralInfoWidget extends StatelessWidget {
const ProfileGeneralInfoWidget({ const ProfileGeneralInfoWidget({
Key key, Key key,

@ -0,0 +1,25 @@
import 'package:flutter/material.dart';
import './Profile_general_info_Widget.dart';
import './profile_header_widget.dart';
import './profile_medical_info_widget.dart';
import './profile_status_info_widget.dart';
/*
*@author: Elham Rababah
*@Date:22/4/2020
*@param:
*@return:PatientProfileWidget
*@desc: Patient Profile Widget
*/
class PatientProfileWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ListView(padding: EdgeInsets.zero, children: <Widget>[
ProfileHeaderWidget(),
ProfileGeneralInfoWidget(),
ProfileMedicalInfoWidget(),
ProfileStatusInfoWidget()
]);
}
}

@ -1,35 +0,0 @@
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import './Profile_general_info_Widget.dart';
import './profile_medical_info_widget.dart';
import './profile_status_info_widget.dart';
import '../../../config/size_config.dart';
import '../../../widgets/shared/profile_image_widget.dart';
class PatientProfileWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ListView(padding: EdgeInsets.zero, children: <Widget>[
Container(
height: SizeConfig.heightMultiplier * 30,
child: ProfileImageWidget(
url:
"http://images4.fanpop.com/image/photos/16200000/David-Schwimmer-Ross-Geller-ross-geller-16258927-629-779.jpg",
name: "Fahad AlSlehm",
des: "324599",
height: SizeConfig.heightMultiplier * 17,
width: SizeConfig.heightMultiplier * 17,
color: Hexcolor('#58434F')),
),
ProfileGeneralInfoWidget(),
ProfileMedicalInfoWidget(),
ProfileStatusInfoWidget()
]);
}
}

@ -2,6 +2,14 @@ import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart'; import '../../shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
/*
*@author: Elham Rababah
*@Date:22/4/2020
*@param: title, info
*@return:ProfileGeneralInfoContentWidget
*@desc: Profile General Info Content Widget
*/
class ProfileGeneralInfoContentWidget extends StatelessWidget { class ProfileGeneralInfoContentWidget extends StatelessWidget {
String title; String title;
String info; String info;

@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../config/size_config.dart';
import '../../shared/profile_image_widget.dart';
/*
*@author: Elham Rababah
*@Date:21/4/2020
*@param:
*@return:
*@desc: Profile Header Widget class
*/
class ProfileHeaderWidget extends StatelessWidget {
const ProfileHeaderWidget({
Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
height: SizeConfig.heightMultiplier * 30,
child: ProfileImageWidget(
url:
"http://images4.fanpop.com/image/photos/16200000/David-Schwimmer-Ross-Geller-ross-geller-16258927-629-779.jpg",
name: "Fahad AlSlehm",
des: "324599",
height: SizeConfig.heightMultiplier * 17,
width: SizeConfig.heightMultiplier * 17,
color: Hexcolor('#58434F')),
);
}
}

@ -5,6 +5,14 @@ import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart'; import '../../shared/app_texts_widget.dart';
import '../../shared/rounded_container_widget.dart'; import '../../shared/rounded_container_widget.dart';
/*
*@author: Elham Rababah
*@Date:22/4/2020
*@param:
*@return:ProfileMedicalInfoWidget
*@desc: Profile Medical Info Widget
*/
class ProfileMedicalInfoWidget extends StatelessWidget { class ProfileMedicalInfoWidget extends StatelessWidget {
const ProfileMedicalInfoWidget({ const ProfileMedicalInfoWidget({
Key key, Key key,

@ -1,10 +1,18 @@
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import '../../../config/size_config.dart'; import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart';
import '../../shared/rounded_container_widget.dart'; import '../../shared/rounded_container_widget.dart';
/*
*@author: Elham Rababah
*@Date:13/4/2020
*@param:
*@return: ProfileStatusInfoWidget
*@desc: Profile Status Info Widget
*/
class ProfileStatusInfoWidget extends StatelessWidget { class ProfileStatusInfoWidget extends StatelessWidget {
const ProfileStatusInfoWidget({ const ProfileStatusInfoWidget({
Key key, Key key,

@ -2,6 +2,14 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/*
*@author: Elham Rababah
*@Date:21/4/2020
*@param: String url;String name;String des;double height;double width; Color color;
*@return: ProfileImageWidget
*@desc: Profile Image Widget class
*/
class ProfileImageWidget extends StatelessWidget { class ProfileImageWidget extends StatelessWidget {
String url; String url;
String name; String name;

Loading…
Cancel
Save