Merge branch 'develop' into 'master'

Develop

See merge request Cloud_Solution/doctor_app_flutter!26
merge-requests/27/merge
ibrahim albitar 5 years ago
commit 262a8ff163

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/interceptor/http_interceptor.dart';
import 'package:http/http.dart';
@ -6,7 +7,6 @@ import 'package:http/http.dart';
// DESCRIPTION : Custom App client to pin base url for all srvices
class AppClient {
static const String BASE_URL = "https://hmgwebservices.com/";
static Client client = HttpInterceptor().getClient();

@ -1,2 +1,5 @@
const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://hmgwebservices.com/Services/';
const BASE_URL = 'https://hmgwebservices.com/Services/';
const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z]";
const ONLY_DATE = "[0-9/]";

@ -1,22 +1,19 @@
import 'dart:convert';
import 'package:doctor_app_flutter/client/app_client.dart';
import 'package:flutter/cupertino.dart';
import '../config/config.dart';
import '../interceptor/http_interceptor.dart';
import '../models/user_model.dart';
const LOGIN_URL =
'Services/Sentry.svc/REST/MemberLogIN_New';
'Sentry.svc/REST/MemberLogIN_New';
const INSERT_DEVICE_IMEI =
'Services/Sentry.svc/REST/DoctorApplication_INSERTDeviceIMEI';
'Sentry.svc/REST/DoctorApplication_INSERTDeviceIMEI';
const SELECT_DEVICE_IMEI =
'Services/Sentry.svc/REST/DoctorApplication_SELECTDeviceIMEIbyIMEI';
'Sentry.svc/REST/DoctorApplication_SELECTDeviceIMEIbyIMEI';
const SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE =
'Services/Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType';
'Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType';
const MEMBER_CHECK_ACTIVATION_CODE_NEW ='Services/Sentry.svc/REST/MemberCheckActivationCode_New';
const MEMBER_CHECK_ACTIVATION_CODE_NEW ='Sentry.svc/REST/MemberCheckActivationCode_New';
class AuthProvider with ChangeNotifier {
Future<Map> login(UserModel userInfo) async {
const url = LOGIN_URL;

@ -1,9 +1,9 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:flutter/services.dart';
import '../../config/size_config.dart';
import '../../util/text_validator.dart';
import '../../widgets/shared/app_buttons_widget.dart';
import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/app_text_form_field.dart';
@ -15,6 +15,7 @@ import 'package:flutter/rendering.dart';
import '../../lookups/patient_lookup.dart';
import '../../models/patient_model.dart';
import '../../widgets/patients/dynamic_elements.dart';
import '../../config/config.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -57,12 +58,12 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
PatientOutSA: false);
void _validateInputs() {
print({_patientSearchFormValues.ProjectID});
print("####IBRAHIM TEST#####"+_patientSearchFormValues.From);
// _patientSearchFormValues.TokenID =
if (_formKey.currentState.validate()) {
// If all data are correct then save data to out variables
// _formKey.currentState.save();
_formKey.currentState.save();
sharedPref.getString(TOKEN).then((token) {
print(token+"EEEEEE");
@ -173,9 +174,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
onSaved: (value) {
_patientSearchFormValues.FirstName = value;
},
validator: (value) {
return TextValidator().validateName(value);
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS
),
SizedBox(
height: 10,
@ -185,9 +187,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
onSaved: (value) {
_patientSearchFormValues.MiddleName = value;
},
validator: (value) {
return TextValidator().validateName(value);
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS
),
SizedBox(
height: 10,
@ -197,9 +200,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
onSaved: (value) {
_patientSearchFormValues.LastName = value;
},
validator: (value) {
return TextValidator().validateName(value);
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS
),
SizedBox(
height: 10,
@ -207,9 +211,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
AppTextFormField(
textInputType: TextInputType.number,
hintText: 'Phone Number',
validator: (value) {
return TextValidator().validateMobile(value);
},
// validator: (value) {
// return TextValidator().validateMobile(value);
// },
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {
_patientSearchFormValues.PatientMobileNumber =
value;
@ -221,9 +226,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
AppTextFormField(
textInputType: TextInputType.number,
hintText: 'Patiant ID',
validator: (value) {
return TextValidator().validateIdNumber(value);
},
//
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {
_patientSearchFormValues.PatientID = 89000;
}),
@ -233,9 +237,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
AppTextFormField(
textInputType: TextInputType.number,
hintText: 'Patiant File',
validator: (value) {
return TextValidator().validateIdNumber(value);
},
// validator: (value) {
// return TextValidator().validateIdNumber(value);
// },
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {
//_patientSearchFormValues. = value;
},

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/patient_model.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:flutter/material.dart';
import '../../util/text_validator.dart';
import 'package:intl/intl.dart';
class DynamicElements extends StatefulWidget {
@ -51,14 +51,15 @@ class _DynamicElementsState extends State<DynamicElements> {
textInputType: TextInputType.number,
hintText: 'From',
controller: _fromDateController,
validator: (value) {
return TextValidator().validateDate(_fromDateController.text);
},
// validator: (value) {
// return TextValidator().validateDate(_fromDateController.text);
// },
inputFormatter: ONLY_DATE,
onTap: () {
_presentDatePicker('_selectedFromDate');
},
onSaved: (value) {
widget._patientSearchFormValues.From = value;
widget._patientSearchFormValues.From = _fromDateController.text;
},
),
@ -72,11 +73,12 @@ class _DynamicElementsState extends State<DynamicElements> {
onTap: () {
_presentDatePicker('_selectedToDate');
},
validator: (value) {
return TextValidator().validateDate(_toDateController.text);
},
// validator: (value) {
// return TextValidator().validateDate(_toDateController.text);
// },
inputFormatter: ONLY_DATE,
onSaved: (value) {
widget._patientSearchFormValues.To = value;
widget._patientSearchFormValues.To = _toDateController.text;
},
),
],

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
// OWNER : Ibrahim albitar
// DATE : 19-04-2020
@ -10,6 +11,7 @@ class AppTextFormField extends FormField<String> {
AppTextFormField({
FormFieldSetter<String> onSaved,
String inputFormatter,
FormFieldValidator<String> validator,
ValueChanged<String> onChanged,
GestureTapCallback onTap,
@ -26,6 +28,7 @@ class AppTextFormField extends FormField<String> {
children: <Widget>[
TextFormField(
keyboardType: textInputType,
inputFormatters: [WhitelistingTextInputFormatter(RegExp(inputFormatter)),],
onChanged: onChanged?? (value){
state.didChange(value);
},

Loading…
Cancel
Save