Merge branch 'elham' into 'master'

Elham

See merge request Cloud_Solution/doctor_app_flutter!2
merge-requests/3/head
Elham 6 years ago
commit 87eb2ca6b8

@ -5,6 +5,8 @@ class SizeConfig {
static double _blockWidth = 0; static double _blockWidth = 0;
static double _blockHeight = 0; static double _blockHeight = 0;
static double realScreenWidth;
static double realScreenHeight;
static double screenWidth; static double screenWidth;
static double screenHeight; static double screenHeight;
static double textMultiplier; static double textMultiplier;
@ -17,33 +19,40 @@ class SizeConfig {
static bool isMobile = false; static bool isMobile = false;
void init(BoxConstraints constraints, Orientation orientation) { void init(BoxConstraints constraints, Orientation orientation) {
realScreenHeight = constraints.maxHeight;
realScreenWidth = constraints.maxWidth;
screenHeight = constraints.maxHeight;
screenWidth = constraints.maxWidth;
_blockWidth = screenWidth / 100; if (constraints.maxWidth <= MAX_SMALL_SCREEN) {
_blockHeight = screenHeight / 100;
if(constraints.maxWidth<= MAX_SMALL_SCREEN){
isMobile = true; isMobile = true;
} }
if (orientation == Orientation.portrait) { if (orientation == Orientation.portrait) {
isPortrait = true; isPortrait = true;
if (screenWidth < 450) { if (realScreenWidth < 450) {
isMobilePortrait = true; isMobilePortrait = true;
} }
textMultiplier = _blockHeight; // textMultiplier = _blockHeight;
imageSizeMultiplier = _blockWidth; // imageSizeMultiplier = _blockWidth;
screenHeight = realScreenHeight;
screenWidth = realScreenWidth;
} else { } else {
isPortrait = false; isPortrait = false;
isMobilePortrait = false; isMobilePortrait = false;
textMultiplier = _blockWidth; // textMultiplier = _blockWidth;
imageSizeMultiplier = _blockHeight; // imageSizeMultiplier = _blockHeight;
screenHeight = realScreenWidth;
screenWidth = realScreenHeight;
} }
_blockWidth = screenWidth / 100;
_blockHeight = screenHeight / 100;
textMultiplier = _blockHeight;
imageSizeMultiplier = _blockWidth;
heightMultiplier = _blockHeight; heightMultiplier = _blockHeight;
widthMultiplier = _blockWidth; widthMultiplier = _blockWidth;
print('screenWidth $screenWidth'); print('realScreenWidth $realScreenWidth');
print('screenHeight $screenHeight'); print('realScreenHeight $realScreenHeight');
print('textMultiplier $textMultiplier'); print('textMultiplier $textMultiplier');
print('imageSizeMultiplier $imageSizeMultiplier'); print('imageSizeMultiplier $imageSizeMultiplier');
print('heightMultiplier$heightMultiplier'); print('heightMultiplier$heightMultiplier');

@ -1 +1,7 @@
enum loginType { knownUser, unknownUser, changePassword, verifyPassword } enum loginType {
knownUser,
unknownUser,
changePassword,
verifyPassword,
verificationMethods
}

@ -9,13 +9,7 @@ import './providers/projects_provider.dart';
import './routes.dart'; import './routes.dart';
void main() => runApp(MyApp()); void main() => runApp(MyApp());
/*
*@author: Elham Rababah
*@Date:13/4/1993
*@param:
*@return:
*@desc: eee
*/
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
// This widget is the root of your application. // This widget is the root of your application.
@override @override
@ -36,7 +30,7 @@ class MyApp extends StatelessWidget {
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
primaryColor: Hexcolor('#B8382C'), primaryColor: Hexcolor('#B8382C'),
buttonColor: Hexcolor('#B8382C'), buttonColor: Hexcolor('#B8382C'),
fontFamily: 'WorkSans'), fontFamily: 'WorkSans',),
initialRoute: INIT_ROUTE, initialRoute: INIT_ROUTE,
routes: routes, routes: routes,
), ),

@ -1,22 +1,23 @@
import 'package:doctor_app_flutter/screens/settings/settings_screen.dart';
import './screens/QR_reader_screen.dart'; import './screens/QR_reader_screen.dart';
import './screens/auth/change_password_screen.dart';
import './screens/auth/login_screen.dart'; import './screens/auth/login_screen.dart';
import './screens/auth/verification_methods_screen.dart';
import './screens/auth/verify_account_screen.dart';
import './screens/blood_bank_screen.dart'; import './screens/blood_bank_screen.dart';
import './screens/doctor_reply_screen.dart';
import './screens/dashboard.dart'; import './screens/dashboard.dart';
import './screens/doctor_reply_screen.dart';
import './screens/medicine/medicine_search_screen.dart'; import './screens/medicine/medicine_search_screen.dart';
import './screens/my_schedule_screen.dart'; import './screens/my_schedule_screen.dart';
import './screens/patients/patient_search_screen.dart'; import './screens/patients/patient_search_screen.dart';
import './screens/patients/patients_list_screen.dart'; import './screens/patients/patients_list_screen.dart';
import './screens/auth/change_password_screen.dart'; import './screens/settings/settings_screen.dart';
import './screens/auth/verify_account_screen.dart';
const String INIT_ROUTE = LOGIN; const String INIT_ROUTE = LOGIN;
const String HOME = '/'; const String HOME = '/';
const String LOGIN = 'login'; const String LOGIN = 'login';
const String CHANGE_PASSWORD = 'change-password'; const String CHANGE_PASSWORD = 'change-password';
const String VERIFY_ACCOUNT = 'verify-account'; const String VERIFY_ACCOUNT = 'verify-account';
const String VERIFICATION_METHODS ='verification-methods';
const String MY_SCHEDULE = 'my-schedule'; const String MY_SCHEDULE = 'my-schedule';
const String QR_READER = 'qr-reader'; const String QR_READER = 'qr-reader';
const String PATIENT_SEARCH = 'patients/patient-search'; const String PATIENT_SEARCH = 'patients/patient-search';
@ -39,4 +40,5 @@ var routes = {
SETTINGS: (_) => SettingsScreen(), SETTINGS: (_) => SettingsScreen(),
CHANGE_PASSWORD: (_) => ChangePasswordScreen(), CHANGE_PASSWORD: (_) => ChangePasswordScreen(),
VERIFY_ACCOUNT: (_) => VerifyAccountScreen(), VERIFY_ACCOUNT: (_) => VerifyAccountScreen(),
VERIFICATION_METHODS:(_)=> VerificationMethodsScreen(),
}; };

@ -0,0 +1,34 @@
import 'package:doctor_app_flutter/widgets/auth/verification_methods.dart';
import 'package:flutter/material.dart';
import '../../lookups/auth_lookup.dart';
import '../../widgets/auth/auth_header.dart';
import '../../widgets/auth/verfiy_account.dart';
/*
*@author: Elham Rababah
*@Date:4/7/2020
*@param:
*@return:
*@desc: Verification Methods screen
*/
class VerificationMethodsScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
// return Container()];
return Scaffold(
backgroundColor: Colors.white,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AuthHeader(loginType.verificationMethods),
VerificationMethods(),
],
),
),
));
}
}

@ -1,7 +1,8 @@
import 'package:doctor_app_flutter/lookups/auth_lookup.dart'; import '../../lookups/auth_lookup.dart';
import 'package:doctor_app_flutter/widgets/auth/auth_header.dart'; import '../../widgets/auth/auth_header.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../widgets/auth/verfiy_account.dart'; import '../../widgets/auth/verfiy_account.dart';
class VerifyAccountScreen extends StatelessWidget { class VerifyAccountScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -13,8 +13,8 @@ class AuthHeader extends StatelessWidget {
var screen = Container( var screen = Container(
margin: SizeConfig.isMobile margin: SizeConfig.isMobile
? null ? null
: EdgeInsetsDirectional.fromSTEB(SizeConfig.screenWidth * 0.30, : EdgeInsetsDirectional.fromSTEB(SizeConfig.realScreenWidth * 0.30,
SizeConfig.screenWidth * 0.1, 0, 0), SizeConfig.realScreenWidth * 0.1, 0, 0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -25,19 +25,13 @@ class AuthHeader extends StatelessWidget {
margin: SizeConfig.isMobile margin: SizeConfig.isMobile
? EdgeInsetsDirectional.fromSTEB(0, 50, 0, 0) ? EdgeInsetsDirectional.fromSTEB(0, 50, 0, 0)
: EdgeInsetsDirectional.fromSTEB( : EdgeInsetsDirectional.fromSTEB(
SizeConfig.screenWidth * 0.13, 0, 0, 0), SizeConfig.realScreenWidth * 0.13, 0, 0, 0),
child: buildImageLogo(), child: buildImageLogo(),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( buildTextUnderLogo(context),
margin: SizeConfig.isMobile
? null
: EdgeInsetsDirectional.fromSTEB(
SizeConfig.screenWidth * 0.13, 0, 0, 0),
child: buildTextUnderLogo(context),
)
], ],
), ),
Column( Column(
@ -74,73 +68,97 @@ class AuthHeader extends StatelessWidget {
if (userType == loginType.unknownUser) { if (userType == loginType.unknownUser) {
img = 'assets/images/welcome_login_icon.png'; img = 'assets/images/welcome_login_icon.png';
} }
if (userType == loginType.verifyPassword) { if (userType == loginType.verifyPassword ||
userType == loginType.verificationMethods) {
img = 'assets/images/verified_icon.png'; img = 'assets/images/verified_icon.png';
} }
return Image.asset( return Image.asset(
img, img,
fit: BoxFit.cover, fit: BoxFit.cover,
height: SizeConfig.isMobile ? null : SizeConfig.screenWidth * 0.09, height: SizeConfig.isMobile ? null : SizeConfig.realScreenWidth * 0.09,
); );
} }
Widget buildTextUnderLogo(context) { Widget buildTextUnderLogo(context) {
Widget finalWid;
double textFontSize =
SizeConfig.isMobile ? 30 : SizeConfig.textMultiplier * 3;
EdgeInsetsDirectional containerMargin;
if (userType == loginType.knownUser || userType == loginType.unknownUser) { if (userType == loginType.knownUser || userType == loginType.unknownUser) {
return Text( finalWid = Text(
"LOGIN", "LOGIN",
style: TextStyle( style: TextStyle(fontSize: textFontSize, fontWeight: FontWeight.w800),
fontSize: SizeConfig.isMobile ? 30 : SizeConfig.screenWidth * 0.035,
fontWeight: FontWeight.w800),
); );
} else { } else {
String text1; String text1;
String text2; String text2;
if (userType == loginType.changePassword) { if (userType == loginType.changePassword) {
text1 = 'Change'; text1 = 'Change ';
text2 = 'Password!'; text2 = 'Password!';
} }
if (userType == loginType.verifyPassword) { if (userType == loginType.verifyPassword) {
text1 = 'verify'; text1 = 'Verify ';
text2 = 'Your Account!'; text2 = 'Your Account!';
} }
if (userType == loginType.verificationMethods) {
text1 = 'Choose ';
text2 = 'Verification';
}
List<Widget> childrens = <Widget>[
Text(
text1,
style: TextStyle(fontSize: textFontSize, fontWeight: FontWeight.w800),
),
Text(
text2,
style: TextStyle(
color: Theme.of(context).primaryColor,
fontSize: textFontSize,
fontWeight: FontWeight.w800),
)
];
return Column( if (!SizeConfig.isMobile) {
crossAxisAlignment: CrossAxisAlignment.start, finalWid = Row(
children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.start,
Text( children: childrens,
text1, );
style: TextStyle( } else {
fontSize: finalWid = Column(
SizeConfig.isMobile ? 30 : SizeConfig.screenWidth * 0.035, crossAxisAlignment: CrossAxisAlignment.start,
fontWeight: FontWeight.w800), children: childrens,
), );
Text( }
text2,
style: TextStyle(
color: Theme.of(context).primaryColor,
fontSize:
SizeConfig.isMobile ? 30 : SizeConfig.screenWidth * 0.035,
fontWeight: FontWeight.w800),
)
],
);
} }
if (!SizeConfig.isMobile) {
double start = SizeConfig.realScreenWidth * 0.13;
if (loginType.verifyPassword == userType ||
loginType.changePassword == userType ||
userType == loginType.verificationMethods) {
start = 0;
}
containerMargin = EdgeInsetsDirectional.fromSTEB(start, 0, 0, 0);
}
return Container(margin: containerMargin, child: finalWid);
} }
Container buildDrAppContainer(BuildContext context) { Container buildDrAppContainer(BuildContext context) {
if (userType == loginType.changePassword || userType == loginType.verifyPassword ) { if (userType == loginType.changePassword ||
userType == loginType.verifyPassword ||
userType == loginType.verificationMethods) {
return Container(); return Container();
} }
return Container( return Container(
margin: SizeConfig.isMobile margin: SizeConfig.isMobile
? null ? null
: EdgeInsetsDirectional.fromSTEB( : EdgeInsetsDirectional.fromSTEB(
SizeConfig.screenWidth * 0.13, 0, 0, 0), SizeConfig.realScreenWidth * 0.13, 0, 0, 0),
child: Text( child: Text(
"Doctor App", "Doctor App",
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.isMobile ? 26 : SizeConfig.screenWidth * 0.030, fontSize: SizeConfig.isMobile ? 26 : SizeConfig.realScreenWidth * 0.030,
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
color: Theme.of(context).primaryColor), color: Theme.of(context).primaryColor),
), ),
@ -148,14 +166,16 @@ class AuthHeader extends StatelessWidget {
} }
Text buildDrSulText(BuildContext context) { Text buildDrSulText(BuildContext context) {
if (userType == loginType.changePassword || userType == loginType.verifyPassword ) { if (userType == loginType.changePassword ||
userType == loginType.verifyPassword ||
userType == loginType.verificationMethods) {
return Text(''); return Text('');
} }
return Text( return Text(
'Dr Sulaiman Al Habib', 'Dr Sulaiman Al Habib',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontSize: SizeConfig.isMobile ? 24 : SizeConfig.screenWidth * 0.029, fontSize: SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029,
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
), ),
); );
@ -166,13 +186,15 @@ class AuthHeader extends StatelessWidget {
if (userType == loginType.unknownUser) { if (userType == loginType.unknownUser) {
text = 'Welcome Back to '; text = 'Welcome Back to ';
} }
if (userType == loginType.changePassword || userType == loginType.verifyPassword ) { if (userType == loginType.changePassword ||
userType == loginType.verifyPassword ||
userType == loginType.verificationMethods) {
return Text(''); return Text('');
} }
return Text( return Text(
text, text,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.isMobile ? 24 : SizeConfig.screenWidth * 0.029), fontSize: SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029),
); );
} }
} }

@ -15,7 +15,7 @@ class ChangePassword extends StatelessWidget {
return Form( return Form(
key: changePassFormKey, key: changePassFormKey,
child: Container( child: Container(
width: SizeConfig.widthMultiplier * 90, width: SizeConfig.realScreenWidth * 0.90,
child: child:
Column(crossAxisAlignment: CrossAxisAlignment.start, children: < Column(crossAxisAlignment: CrossAxisAlignment.start, children: <
Widget>[ Widget>[

@ -128,14 +128,16 @@ class _KnownUserLoginState extends State<KnownUserLogin> {
['MemberName'], ['MemberName'],
style: TextStyle( style: TextStyle(
color: Hexcolor('515A5D'), color: Hexcolor('515A5D'),
fontSize: 2.5 *SizeConfig.textMultiplier, fontSize:
2.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w800), fontWeight: FontWeight.w800),
), ),
Text( Text(
'ENT Spec', 'ENT Spec',
style: TextStyle( style: TextStyle(
color: Hexcolor('515A5D'), color: Hexcolor('515A5D'),
fontSize: 1.5 *SizeConfig.textMultiplier), fontSize:
1.5 * SizeConfig.textMultiplier),
) )
], ],
), ),
@ -193,7 +195,7 @@ class _KnownUserLoginState extends State<KnownUserLogin> {
// textAlign: TextAlign.center, // textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 2.5 *SizeConfig.textMultiplier), fontSize: 2.5 * SizeConfig.textMultiplier),
), ),
), ),
), ),
@ -219,7 +221,7 @@ class _KnownUserLoginState extends State<KnownUserLogin> {
"More verification Options".toUpperCase(), "More verification Options".toUpperCase(),
style: TextStyle( style: TextStyle(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
fontSize: 2.5 *SizeConfig.textMultiplier), fontSize: 2.5 * SizeConfig.textMultiplier),
)), )),
), ),
SizedBox( SizedBox(
@ -231,7 +233,7 @@ class _KnownUserLoginState extends State<KnownUserLogin> {
} }
navigateToMoreOption() { navigateToMoreOption() {
Navigator.of(context).pushNamed('routeName'); Navigator.of(context).pushNamed(VERIFICATION_METHODS);
} }
_authenticate() { _authenticate() {

@ -57,13 +57,14 @@ class _LoginFormState extends State<LoginForm> {
return Form( return Form(
key: loginFormKey, key: loginFormKey,
child: Container( child: Container(
width: SizeConfig.widthMultiplier * 90, width: SizeConfig.realScreenWidth * 0.90,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
buildSizedBox(), buildSizedBox(),
TextFormField( TextFormField(
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
// style: TextStyle(fontSize: 30),
decoration: InputDecoration( decoration: InputDecoration(
prefixIcon: Image.asset('assets/images/user_id_icon.png'), prefixIcon: Image.asset('assets/images/user_id_icon.png'),
hintText: 'Enter ID', hintText: 'Enter ID',
@ -180,7 +181,9 @@ class _LoginFormState extends State<LoginForm> {
), ),
RaisedButton( RaisedButton(
onPressed: () { onPressed: () {
login(context, authProv); Navigator.of(context).pushNamed(VERIFICATION_METHODS);
// login(context, authProv);
}, },
textColor: Colors.white, textColor: Colors.white,
elevation: 0.0, elevation: 0.0,
@ -191,7 +194,7 @@ 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.widthMultiplier * 30, width: SizeConfig.realScreenWidth * 0.30,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
@ -259,10 +262,11 @@ class _LoginFormState extends State<LoginForm> {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setSharedPref('platformImei', _platformImei); setSharedPref('platformImei', _platformImei);
saveObjToString('loggedUser', preRes); saveObjToString('loggedUser', preRes);
Navigator.of(context).pushNamed(VERIFY_ACCOUNT); Navigator.of(context).pushNamed(VERIFICATION_METHODS);
// save imei on shared preferance // save imei on shared preferance
} else { } else {
// handel error // handel error
print('Heeeeeeeeeeeer');
showLoginError(res['ErrorEndUserMessage']); showLoginError(res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {

@ -1,8 +1,9 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/routes.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 '../../routes.dart';
class VerifyAccount extends StatelessWidget { class VerifyAccount extends StatelessWidget {
final verifyAccountForm = GlobalKey<FormState>(); final verifyAccountForm = GlobalKey<FormState>();
@override @override
@ -10,7 +11,7 @@ class VerifyAccount extends StatelessWidget {
return Form( return Form(
key: verifyAccountForm, key: verifyAccountForm,
child: Container( child: Container(
width: SizeConfig.widthMultiplier * 90, width: SizeConfig.realScreenWidth * 0.90,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -19,7 +20,7 @@ class VerifyAccount extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
Container( Container(
width: 85, width:SizeConfig.realScreenWidth*0.20,
child: TextFormField( child: TextFormField(
decoration: InputDecoration( decoration: InputDecoration(
// ts/images/password_icon.png // ts/images/password_icon.png
@ -39,7 +40,7 @@ class VerifyAccount extends StatelessWidget {
onChanged: (_) {}, onChanged: (_) {},
)), )),
Container( Container(
width: 85, width:SizeConfig.realScreenWidth*0.20,
child: TextFormField( child: TextFormField(
decoration: InputDecoration( decoration: InputDecoration(
// ts/images/password_icon.png // ts/images/password_icon.png
@ -59,7 +60,7 @@ class VerifyAccount extends StatelessWidget {
onChanged: (_) {}, onChanged: (_) {},
)), )),
Container( Container(
width: 85, width:SizeConfig.realScreenWidth*0.20,
child: TextFormField( child: TextFormField(
decoration: InputDecoration( decoration: InputDecoration(
// ts/images/password_icon.png // ts/images/password_icon.png
@ -79,7 +80,7 @@ class VerifyAccount extends StatelessWidget {
onChanged: (_) {}, onChanged: (_) {},
)), )),
Container( Container(
width: 85, width:SizeConfig.realScreenWidth*0.20,
child: TextFormField( child: TextFormField(
decoration: InputDecoration( decoration: InputDecoration(
// ts/images/password_icon.png // ts/images/password_icon.png

@ -0,0 +1,126 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
/*
*@author: Elham Rababah
*@Date:4/7/2020
*@param:
*@return:
*@desc: Verification Methods widget
*/
class VerificationMethods extends StatelessWidget {
MainAxisAlignment spaceBetweenMethods =MainAxisAlignment.spaceBetween;
@override
Widget build(BuildContext context) {
// if(!SizeConfig.isMobile) {
// spaceBetweenMethods = MainAxisAlignment.spaceAround;
// }
return Container(
width: SizeConfig.realScreenWidth * 0.90,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Please choose one of the Following option to verify",
style: TextStyle(
fontSize: 3.5 * SizeConfig.textMultiplier,
),
),
SizedBox(
height: 40,
),
Container(
width: SizeConfig.realScreenWidth * 80,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: spaceBetweenMethods,
children: <Widget>[
buildVerificationMethod(context,
'assets/images/verification_fingerprint_icon.png',
'Fingerprint',
() {}),
buildVerificationMethod(context,
'assets/images/verification_faceid_icon.png',
'Face ID',
() {}),
],
),
SizedBox(
height: 40,
),
Row(
mainAxisAlignment: spaceBetweenMethods,
children: <Widget>[
buildVerificationMethod(context,
'assets/images/verification_whatsapp_icon.png',
'WhatsApp',
() {}),
buildVerificationMethod(context,
'assets/images/verification_sms_icon.png',
'SMS',
() {}),
],
)
],
),
),
SizedBox(
height: SizeConfig.heightMultiplier * 2,
)
],
),
);
}
/*
*@author: Elham Rababah
*@Date:07/4/2020
*@param: url , dec, fun
*@return: InkWell widget
*@desc: Build Verification Method
*/
InkWell buildVerificationMethod(context,url, dec, fun) {
return InkWell(
onTap: (){
Navigator.of(context).pushNamed(VERIFY_ACCOUNT);
},
child: Container(
// height: SizeConfig.heightMultiplier *2,
height: SizeConfig.heightMultiplier * 19,
width: SizeConfig.widthMultiplier * 37,
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(
width: 1,
color: Hexcolor(
'#CCCCCC') // <--- border width here
),
borderRadius: BorderRadius.all(Radius.circular(10))),
child: Column(
children: <Widget>[
Container(
margin: EdgeInsetsDirectional.only(
top: SizeConfig.heightMultiplier * 0.5),
child: Image.asset(
url,
height: SizeConfig.heightMultiplier * 10,
fit: BoxFit.cover,
),
),
SizedBox(
height: 10,
),
Text(dec, style: TextStyle(fontSize:SizeConfig.textMultiplier*2 ),)
],
),
),
);
}
}

@ -84,7 +84,7 @@ packages:
name: build_resolvers name: build_resolvers
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.3" version: "1.3.4"
build_runner: build_runner:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -182,7 +182,7 @@ packages:
name: dart_style name: dart_style
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.3" version: "1.3.4"
fixnum: fixnum:
dependency: transitive dependency: transitive
description: description:
@ -387,13 +387,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.9.3" version: "1.9.3"
package_resolver:
dependency: transitive
description:
name: package_resolver
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.10"
path: path:
dependency: transitive dependency: transitive
description: description:

@ -69,6 +69,10 @@ flutter:
- assets/images/verification_faceid_lg_icon.png - assets/images/verification_faceid_lg_icon.png
- assets/images/verification_sms_lg_icon.png - assets/images/verification_sms_lg_icon.png
- assets/images/verification_whatsapp_lg_icon.png - assets/images/verification_whatsapp_lg_icon.png
- assets/images/verification_fingerprint_icon.png
- assets/images/verification_faceid_icon.png
- assets/images/verification_sms_icon.png
- assets/images/verification_whatsapp_icon.png
- assets/images/close_icon.png - assets/images/close_icon.png
- assets/images/welcome_login_icon.png - assets/images/welcome_login_icon.png
- assets/images/verified_icon.png - assets/images/verified_icon.png

Loading…
Cancel
Save