Conflicts:
	lib/landing_page.dart
merge-requests/129/head
hussam al-habibeh 6 years ago
commit 8f04edb450

@ -113,4 +113,48 @@ const Map<String, Map<String, String>> localizedValues = {
'description': {'en': 'Description', 'ar': 'الوصف'}, 'description': {'en': 'Description', 'ar': 'الوصف'},
'value': {'en': 'Value', 'ar': 'القيمة'}, 'value': {'en': 'Value', 'ar': 'القيمة'},
'range': {'en': 'range', 'ar': 'النطاق'}, 'range': {'en': 'range', 'ar': 'النطاق'},
'enterId': {'en': 'Enter ID', 'ar': 'الهوية'},
'pleaseEnterYourID': {
'en': 'Please enter your ID',
'ar': 'الرجاء ادخال الهوية'
},
'enterPassword': {'en': 'Enter Password', 'ar': 'الرقم السري'},
'pleaseEnterPassword': {
'en': 'Please Enter Password',
'ar': 'الرجاء ادخال الرقم السري'
},
'selectYourProject': {'en': 'Select Your Project', 'ar': 'اختر المستشفى'},
'pleaseEnterYourProject': {
'en': 'Please Enter Your Project',
'ar': 'الرجاء ادخال مستشفى'
},
'login': {'en': 'LOGIN', 'ar': 'تسجيل دخول'},
'drSulaimanAlHabib': {'en': 'Dr Sulaiman Al Habib', 'ar': 'د.سليمان الحبيب'},
'welcomeTo': {'en': 'Welcome to', 'ar': 'مرحبا بك'},
'welcomeBackTo': {'en': 'Welcome Back to', 'ar': 'مرحبًا بعودتك الى '},
'home': {'en': 'Home', 'ar': 'الرئيسية'},
'services': {'en': 'SERVICES', 'ar': 'الخدمات'},
'sms': {'en': 'SMS', 'ar': 'رسالة قصيرة'},
'fingerprint': {'en': 'Fingerprint', 'ar': 'بصمة'},
'faceId': {'en': 'Face ID', 'ar': 'معرف الوجه'},
'whatsApp': {'en': 'WhatsApp', 'ar': 'واتس اب'},
'pleaseChoose': {
'en': 'Please choose one of the Following option to verify',
'ar': 'يرجى اختيار أحد الخيارات التالية للتحقق'
},
'choose': {'en': 'Choose', 'ar': 'اختر'},
'verification': {'en': 'Verification', 'ar': 'طريقة التحقق'},
'firstStep': {
'en': 'As a first step, you need to verify by one of those methods',
'ar': 'كخطوة أولى ، تحتاج إلى التحقق بإحدى هذه الطرق'
},
'yourAccount!': {'en': 'Your Account!', 'ar': 'حسابك!'},
'verify1': {'en': 'Verify', 'ar': 'ثبت'},
'youWillReceiveA': {'en': 'You will receive a', 'ar': 'سوف تتلقى '},
'loginCode': {'en': 'Login Code', 'ar': 'رمز تسجيل دخول'},
'smsBy': {'en': 'By SMS', 'ar': 'عن طريق رسالة قصيرة'},
'pleaseEnterTheCode': {
'en': 'Please enter the code',
'ar': 'الرجاء ادخال الرمز'
},
}; };

@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class LandingPage extends StatefulWidget { class LandingPage extends StatefulWidget {
@override @override
_LandingPageState createState() => _LandingPageState(); _LandingPageState createState() => _LandingPageState();
@ -38,8 +38,7 @@ class _LandingPageState extends State<LandingPage> {
elevation: 0, elevation: 0,
backgroundColor: Hexcolor('#515B5D'), backgroundColor: Hexcolor('#515B5D'),
textTheme: TextTheme( textTheme: TextTheme(
headline6: headline6: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
title: Text(getText(currentTab).toUpperCase()), title: Text(getText(currentTab).toUpperCase()),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
@ -51,6 +50,7 @@ class _LandingPageState extends State<LandingPage> {
}, },
), ),
centerTitle: true, centerTitle: true,
), ),
drawer: SafeArea(child: AppDrawer()), drawer: SafeArea(child: AppDrawer()),
extendBody: true, extendBody: true,
@ -65,19 +65,20 @@ class _LandingPageState extends State<LandingPage> {
], ],
), ),
bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab), bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab),
); );
} }
getText(currentTab) { getText(currentTab) {
switch (currentTab) { switch (currentTab) {
case 0: case 0:
return "HOME"; return TranslationBase.of(context).home;
case 1: case 1:
return "REPLAY"; return TranslationBase.of(context).replay;
case 2: case 2:
return "SCHEDULE"; return TranslationBase.of(context).mySchedule;
case 3: case 3:
return 'SERVICES'; return TranslationBase.of(context).services;
} }
} }
} }

@ -141,6 +141,44 @@ class TranslationBase {
String get description => localizedValues['description'][locale.languageCode]; String get description => localizedValues['description'][locale.languageCode];
String get value => localizedValues['value'][locale.languageCode]; String get value => localizedValues['value'][locale.languageCode];
String get range => localizedValues['range'][locale.languageCode]; String get range => localizedValues['range'][locale.languageCode];
String get enterId => localizedValues['enterId'][locale.languageCode];
String get pleaseEnterYourID =>
localizedValues['pleaseEnterYourID'][locale.languageCode];
String get enterPassword =>
localizedValues['enterPassword'][locale.languageCode];
String get pleaseEnterPassword =>
localizedValues['pleaseEnterPassword'][locale.languageCode];
String get selectYourProject =>
localizedValues['selectYourProject'][locale.languageCode];
String get pleaseEnterYourProject =>
localizedValues['pleaseEnterYourProject'][locale.languageCode];
String get login => localizedValues['login'][locale.languageCode];
String get drSulaimanAlHabib =>
localizedValues['drSulaimanAlHabib'][locale.languageCode];
String get welcomeTo => localizedValues['welcomeTo'][locale.languageCode];
String get welcomeBackTo =>
localizedValues['welcomeBackTo'][locale.languageCode];
String get home => localizedValues['home'][locale.languageCode];
String get services => localizedValues['services'][locale.languageCode];
String get sms => localizedValues['sms'][locale.languageCode];
String get fingerprint => localizedValues['fingerprint'][locale.languageCode];
String get faceId => localizedValues['faceId'][locale.languageCode];
String get whatsApp => localizedValues['whatsApp'][locale.languageCode];
String get pleaseChoose =>
localizedValues['pleaseChoose'][locale.languageCode];
String get choose => localizedValues['choose'][locale.languageCode];
String get verification =>
localizedValues['verification'][locale.languageCode];
String get firstStep => localizedValues['firstStep'][locale.languageCode];
String get yourAccount =>
localizedValues['yourAccount!'][locale.languageCode];
String get verify1 => localizedValues['verify1'][locale.languageCode];
String get youWillReceiveA =>
localizedValues['youWillReceiveA'][locale.languageCode];
String get loginCode => localizedValues['loginCode'][locale.languageCode];
String get smsBy => localizedValues['smsBy'][locale.languageCode];
String get pleaseEnterTheCode =>
localizedValues['pleaseEnterTheCode'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -4,6 +4,7 @@ import 'package:hexcolor/hexcolor.dart';
import '../../config/size_config.dart'; import '../../config/size_config.dart';
import '../../lookups/auth_lookup.dart'; import '../../lookups/auth_lookup.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class AuthHeader extends StatelessWidget { class AuthHeader extends StatelessWidget {
var userType; var userType;
@ -24,7 +25,8 @@ class AuthHeader extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Container( Container(
margin: SizeConfig.isMobile margin: SizeConfig.isMobile
? EdgeInsetsDirectional.fromSTEB(0, SizeConfig.realScreenHeight*0.03, 0, 0) ? EdgeInsetsDirectional.fromSTEB(
0, SizeConfig.realScreenHeight * 0.03, 0, 0)
: EdgeInsetsDirectional.fromSTEB( : EdgeInsetsDirectional.fromSTEB(
SizeConfig.realScreenWidth * 0.13, 0, 0, 0), SizeConfig.realScreenWidth * 0.13, 0, 0, 0),
child: buildImageLogo(), child: buildImageLogo(),
@ -42,7 +44,7 @@ class AuthHeader extends StatelessWidget {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
buildWelText(), buildWelText(context),
buildDrSulText(context), buildDrSulText(context),
] ]
: <Widget>[ : <Widget>[
@ -52,7 +54,7 @@ class AuthHeader extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
buildWelText(), buildWelText(context),
buildDrSulText(context), buildDrSulText(context),
], ],
), ),
@ -88,7 +90,7 @@ class AuthHeader extends StatelessWidget {
EdgeInsetsDirectional containerMargin; EdgeInsetsDirectional containerMargin;
if (userType == loginType.knownUser || userType == loginType.unknownUser) { if (userType == loginType.knownUser || userType == loginType.unknownUser) {
finalWid = Text( finalWid = Text(
"LOGIN", TranslationBase.of(context).login,
style: TextStyle(fontSize: textFontSize, fontWeight: FontWeight.w800), style: TextStyle(fontSize: textFontSize, fontWeight: FontWeight.w800),
); );
} else { } else {
@ -99,12 +101,12 @@ class AuthHeader extends StatelessWidget {
text2 = 'Password!'; text2 = 'Password!';
} }
if (userType == loginType.verifyPassword) { if (userType == loginType.verifyPassword) {
text1 = 'Verify '; text1 = TranslationBase.of(context).verify1;
text2 = 'Your Account!'; text2 = TranslationBase.of(context).yourAccount;
} }
if (userType == loginType.verificationMethods) { if (userType == loginType.verificationMethods) {
text1 = 'Choose '; text1 = TranslationBase.of(context).choose;
text2 = 'Verification'; text2 = TranslationBase.of(context).verification;
} }
List<Widget> childrens = <Widget>[ List<Widget> childrens = <Widget>[
Text( Text(
@ -159,7 +161,8 @@ class AuthHeader extends StatelessWidget {
child: Text( child: Text(
"Doctor App", "Doctor App",
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.isMobile ? 26 : SizeConfig.realScreenWidth * 0.030, fontSize:
SizeConfig.isMobile ? 26 : SizeConfig.realScreenWidth * 0.030,
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
color: Hexcolor('#B8382C')), color: Hexcolor('#B8382C')),
), ),
@ -173,7 +176,7 @@ class AuthHeader extends StatelessWidget {
return Text(''); return Text('');
} }
return Text( return Text(
'Dr Sulaiman Al Habib', TranslationBase.of(context).drSulaimanAlHabib,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontSize: SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029, fontSize: SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029,
@ -182,10 +185,10 @@ class AuthHeader extends StatelessWidget {
); );
} }
Widget buildWelText() { Widget buildWelText(BuildContext context) {
String text = 'Welcome to '; String text = TranslationBase.of(context).welcomeTo;
if (userType == loginType.unknownUser) { if (userType == loginType.unknownUser) {
text = 'Welcome Back to '; text = TranslationBase.of(context).welcomeBackTo;
} }
if (userType == loginType.changePassword || if (userType == loginType.changePassword ||
userType == loginType.verifyPassword || userType == loginType.verifyPassword ||
@ -195,7 +198,8 @@ class AuthHeader extends StatelessWidget {
return Text( return Text(
text, text,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029), fontSize:
SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029),
); );
} }
} }

@ -16,6 +16,7 @@ import '../../routes.dart';
import '../../util/dr_app_shared_pref.dart'; import '../../util/dr_app_shared_pref.dart';
import '../../util/dr_app_toast_msg.dart'; import '../../util/dr_app_toast_msg.dart';
import '../../util/helpers.dart'; import '../../util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = DrAppSharedPreferances();
DrAppToastMsg toastMsg = DrAppToastMsg(); DrAppToastMsg toastMsg = DrAppToastMsg();
@ -60,17 +61,16 @@ class _LoginFormState extends State<LoginForm> {
@override @override
void didChangeDependencies() { void didChangeDependencies() {
super.didChangeDependencies(); super.didChangeDependencies();
authProv = Provider.of<AuthProvider>(context); authProv = Provider.of<AuthProvider>(context);
if (_isInit) { if (_isInit) {
if (projectsList.length == 0) { if (projectsList.length == 0) {
getProjectsList(); getProjectsList();
} }
} }
_isInit = false; _isInit = false;
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Form( return Form(
@ -85,10 +85,12 @@ class _LoginFormState extends State<LoginForm> {
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
textInputAction: TextInputAction.next, textInputAction: TextInputAction.next,
decoration: buildInputDecoration( decoration: buildInputDecoration(
context, 'Enter ID', 'assets/images/user_id_icon.png'), context,
TranslationBase.of(context).enterId,
'assets/images/user_id_icon.png'),
validator: (value) { validator: (value) {
if (value.isEmpty) { if (value.isEmpty) {
return 'Please enter your ID'; return TranslationBase.of(context).pleaseEnterYourID;
} }
return null; return null;
}, },
@ -106,10 +108,12 @@ class _LoginFormState extends State<LoginForm> {
obscureText: true, obscureText: true,
textInputAction: TextInputAction.next, textInputAction: TextInputAction.next,
decoration: buildInputDecoration( decoration: buildInputDecoration(
context, 'Enter Password', 'assets/images/password_icon.png'), context,
TranslationBase.of(context).enterPassword,
'assets/images/password_icon.png'),
validator: (value) { validator: (value) {
if (value.isEmpty) { if (value.isEmpty) {
return 'Please enter your Password'; return TranslationBase.of(context).pleaseEnterPassword;
} }
return null; return null;
}, },
@ -132,11 +136,13 @@ class _LoginFormState extends State<LoginForm> {
}, },
showCursor: false, showCursor: false,
readOnly: true, readOnly: true,
decoration: buildInputDecoration(context, 'Select your porject', decoration: buildInputDecoration(
context,
TranslationBase.of(context).selectYourProject,
'assets/images/password_icon.png'), 'assets/images/password_icon.png'),
validator: (value) { validator: (value) {
if (value.isEmpty) { if (value.isEmpty) {
return 'Please enter your porject'; return TranslationBase.of(context).pleaseEnterYourProject;
} }
return null; return null;
}), }),
@ -157,11 +163,11 @@ class _LoginFormState extends State<LoginForm> {
child: Container( child: Container(
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
height: 50, height: 50,
width: SizeConfig.realScreenWidth * 0.30, width: SizeConfig.realScreenWidth * 0.35,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Text('LOGIN', Text(TranslationBase.of(context).login,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.isMobilePortrait fontSize: SizeConfig.isMobilePortrait
? 2.3 * SizeConfig.textMultiplier ? 2.3 * SizeConfig.textMultiplier
@ -293,7 +299,7 @@ class _LoginFormState extends State<LoginForm> {
// Platform messages may fail, so we use a try/catch PlatformException. // Platform messages may fail, so we use a try/catch PlatformException.
try { try {
platformImei = platformImei =
await ImeiPlugin.getImei(shouldShowRequestPermissionRationale: false); await ImeiPlugin.getImei(shouldShowRequestPermissionRationale: false);
idunique = await ImeiPlugin.getId(); idunique = await ImeiPlugin.getId();
} on PlatformException { } on PlatformException {
platformImei = 'Failed to get platform version.'; platformImei = 'Failed to get platform version.';

@ -15,6 +15,7 @@ import '../../util/dr_app_shared_pref.dart';
import '../../util/dr_app_toast_msg.dart'; import '../../util/dr_app_toast_msg.dart';
import '../../util/helpers.dart'; import '../../util/helpers.dart';
import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
Helpers helpers = Helpers(); Helpers helpers = Helpers();
@ -289,10 +290,10 @@ class _VerifyAccountState extends State<VerifyAccount> {
String medthodName; String medthodName;
switch (model['OTP_SendType']) { switch (model['OTP_SendType']) {
case 1: case 1:
medthodName = 'SMS'; medthodName = TranslationBase.of(context).smsBy;
break; break;
case 2: case 2:
medthodName = 'WhatsApp'; medthodName = TranslationBase.of(context).whatsApp;
break; break;
default: default:
} }
@ -301,11 +302,12 @@ class _VerifyAccountState extends State<VerifyAccount> {
style: new TextStyle( style: new TextStyle(
fontSize: 3.0 * SizeConfig.textMultiplier, color: Colors.black), fontSize: 3.0 * SizeConfig.textMultiplier, color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan(text: 'You will receive a '), new TextSpan(text: TranslationBase.of(context).youWillReceiveA),
new TextSpan( new TextSpan(
text: 'Login Code ', text: TranslationBase.of(context).loginCode,
style: TextStyle(fontWeight: FontWeight.w700)), style: TextStyle(fontWeight: FontWeight.w700)),
new TextSpan(text: 'By ${medthodName}, Please enter the code') new TextSpan(text: ' ${medthodName},'),
TextSpan(text: TranslationBase.of(context).pleaseEnterTheCode)
])); ]));
return text; return text;
} }

@ -10,6 +10,7 @@ import '../../routes.dart';
import '../../util/dr_app_shared_pref.dart'; import '../../util/dr_app_shared_pref.dart';
import '../../util/helpers.dart'; import '../../util/helpers.dart';
import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
Helpers helpers = Helpers(); Helpers helpers = Helpers();
@ -50,7 +51,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
super.didChangeDependencies(); super.didChangeDependencies();
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
verificationMethod = verificationMethod =
routeArgs != null ? routeArgs['verificationMethod'] : null; routeArgs != null ? routeArgs['verificationMethod'] : null;
} }
@override @override
@ -74,8 +75,8 @@ class _VerificationMethodsState extends State<VerificationMethods> {
children: <Widget>[ children: <Widget>[
Text( Text(
hideSilentMethods() hideSilentMethods()
? 'As a first step, you need to verify by one of those methods' ? TranslationBase.of(context).firstStep
: 'Please choose one of the Following option to verify', : TranslationBase.of(context).pleaseChoose,
style: TextStyle( style: TextStyle(
fontSize: 3.5 * SizeConfig.textMultiplier, fontSize: 3.5 * SizeConfig.textMultiplier,
), ),
@ -101,17 +102,17 @@ class _VerificationMethodsState extends State<VerificationMethods> {
child: buildFingerprintMethod( child: buildFingerprintMethod(
context, authProv), context, authProv),
replacement: replacement:
buildWhatsAppMethod(context, authProv), buildWhatsAppMethod(context, authProv),
), ),
Visibility( Visibility(
visible: hideSilentMethods() ? false : true, visible: hideSilentMethods() ? false : true,
child: buildFaceIDMethod(context, authProv), child: buildFaceIDMethod(context, authProv),
replacement: replacement:
buildSMSMethod(context, authProv), buildSMSMethod(context, authProv),
), ),
Visibility( Visibility(
visible: visible:
hideSilentMethods() ? false : true, hideSilentMethods() ? false : true,
child: buildWhatsAppMethod( child: buildWhatsAppMethod(
context, authProv)), context, authProv)),
Visibility( Visibility(
@ -126,8 +127,8 @@ class _VerificationMethodsState extends State<VerificationMethods> {
// height: 500, // height: 500,
), ),
SizedBox( SizedBox(
// height: 20, // height: 20,
) )
], ],
), ),
); );
@ -137,7 +138,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
} }
/* /*
*@author: Elham Rababah *@author: Elham Rababah
*@Date:28/5/2020 *@Date:28/5/2020
*@param: BuildContext context, AuthProvider authProv *@param: BuildContext context, AuthProvider authProv
*@return: Center widget *@return: Center widget
@ -145,12 +146,15 @@ class _VerificationMethodsState extends State<VerificationMethods> {
*/ */
Center buildSMSMethod(BuildContext context, AuthProvider authProv) { Center buildSMSMethod(BuildContext context, AuthProvider authProv) {
return buildVerificationMethod( return buildVerificationMethod(
context, 'assets/images/verification_sms_icon.png', 'SMS', () { context,
'assets/images/verification_sms_icon.png',
TranslationBase.of(context).sms, () {
sendActivationCodeByOtpNotificationType(1, authProv); sendActivationCodeByOtpNotificationType(1, authProv);
}); });
} }
/* /*
*@author: Elham Rababah *@author: Elham Rababah
*@Date:28/5/2020 *@Date:28/5/2020
*@param: BuildContext context, AuthProvider authProv *@param: BuildContext context, AuthProvider authProv
*@return: Center widget *@return: Center widget
@ -158,13 +162,15 @@ class _VerificationMethodsState extends State<VerificationMethods> {
*/ */
Center buildWhatsAppMethod(BuildContext context, AuthProvider authProv) { Center buildWhatsAppMethod(BuildContext context, AuthProvider authProv) {
return buildVerificationMethod( return buildVerificationMethod(
context, 'assets/images/verification_whatsapp_icon.png', 'WhatsApp', context,
() { 'assets/images/verification_whatsapp_icon.png',
sendActivationCodeByOtpNotificationType(2, authProv); TranslationBase.of(context).whatsApp, () {
}); sendActivationCodeByOtpNotificationType(2, authProv);
});
} }
/*
*@author: Elham Rababah /*
*@author: Elham Rababah
*@Date:28/5/2020 *@Date:28/5/2020
*@param: BuildContext context, AuthProvider authProv *@param: BuildContext context, AuthProvider authProv
*@return: Center widget *@return: Center widget
@ -172,26 +178,31 @@ class _VerificationMethodsState extends State<VerificationMethods> {
*/ */
Center buildFaceIDMethod(BuildContext context, AuthProvider authProv) { Center buildFaceIDMethod(BuildContext context, AuthProvider authProv) {
return buildVerificationMethod( return buildVerificationMethod(
context, 'assets/images/verification_faceid_icon.png', 'Face ID', () { context,
'assets/images/verification_faceid_icon.png',
TranslationBase.of(context).faceId, () {
sendActivationCodeByOtpNotificationType(3, authProv); sendActivationCodeByOtpNotificationType(3, authProv);
}); });
} }
/*
*@author: Elham Rababah /*
*@author: Elham Rababah
*@Date:28/5/2020 *@Date:28/5/2020
*@param: BuildContext context, AuthProvider authProv *@param: BuildContext context, AuthProvider authProv
*@return: Center widget *@return: Center widget
*@desc: build Fingerprint Methods widget *@desc: build Fingerprint Methods widget
*/ */
Center buildFingerprintMethod(BuildContext context, AuthProvider authProv) { Center buildFingerprintMethod(BuildContext context, AuthProvider authProv) {
return buildVerificationMethod(context, return buildVerificationMethod(
'assets/images/verification_fingerprint_icon.png', 'Fingerprint', () { context,
sendActivationCodeByOtpNotificationType(4, authProv); 'assets/images/verification_fingerprint_icon.png',
}); TranslationBase.of(context).fingerprint, () {
sendActivationCodeByOtpNotificationType(4, authProv);
});
} }
/* /*
*@author: Elham Rababah *@author: Elham Rababah
*@Date:28/5/2020 *@Date:28/5/2020
*@param: BuildContext context, AuthProvider authProv *@param: BuildContext context, AuthProvider authProv
*@return: Center widget *@return: Center widget
@ -212,7 +223,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
width: 1, width: 1,
color: Hexcolor( color: Hexcolor(
'#CCCCCC') // <--- border width here '#CCCCCC') // <--- border width here
), ),
borderRadius: BorderRadius.all(Radius.circular(10))), borderRadius: BorderRadius.all(Radius.circular(10))),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -243,20 +254,19 @@ class _VerificationMethodsState extends State<VerificationMethods> {
return verificationMethod == 4 || verificationMethod == 3 ? true : false; return verificationMethod == 4 || verificationMethod == 3 ? true : false;
} }
/* /*
*@author: Elham Rababah *@author: Elham Rababah
*@Date:15/4/2020 *@Date:15/4/2020
*@param: oTPSendType *@param: oTPSendType
*@return: *@return:
*@desc: send Activation Code By Otp Notification Type *@desc: send Activation Code By Otp Notification Type
*/ */
sendActivationCodeByOtpNotificationType(oTPSendType, AuthProvider authProv) { sendActivationCodeByOtpNotificationType(oTPSendType, AuthProvider authProv) {
// TODO : build enum for verfication method // TODO : build enum for verfication method
if (oTPSendType == 1 || oTPSendType == 2) { if (oTPSendType == 1 || oTPSendType == 2) {
widget.changeLoadingStata(true); widget.changeLoadingStata(true);
Map<String,dynamic> model = { Map<String, dynamic> model = {
"LogInTokenID": _loggedUser['LogInTokenID'], "LogInTokenID": _loggedUser['LogInTokenID'],
"Channel": 9, "Channel": 9,
"MobileNumber": _loggedUser['MobileNumber'], "MobileNumber": _loggedUser['MobileNumber'],
@ -271,7 +281,8 @@ class _VerificationMethodsState extends State<VerificationMethods> {
widget.changeLoadingStata(false); widget.changeLoadingStata(false);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
Navigator.of(context).pushReplacementNamed(VERIFY_ACCOUNT, arguments: {'model':model}); Navigator.of(context).pushReplacementNamed(VERIFY_ACCOUNT,
arguments: {'model': model});
} else { } else {
print(res['ErrorEndUserMessage']); print(res['ErrorEndUserMessage']);
helpers.showErrorToast(res['ErrorEndUserMessage']); helpers.showErrorToast(res['ErrorEndUserMessage']);

@ -56,7 +56,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
key: key, key: key,
patient: patient, patient: patient,
route: PROGRESS_NOTE, route: PROGRESS_NOTE,
name: 'Progress Notes', name: TranslationBase.of(context).progressNote,
icon: 'heartbeat.png')), icon: 'heartbeat.png')),
PatientProfileButton( PatientProfileButton(
key: key, key: key,

Loading…
Cancel
Save