Finish verification methods page
parent
28e770061e
commit
4195afc7be
@ -1 +1,7 @@
|
||||
enum loginType { knownUser, unknownUser, changePassword, verifyPassword }
|
||||
enum loginType {
|
||||
knownUser,
|
||||
unknownUser,
|
||||
changePassword,
|
||||
verifyPassword,
|
||||
verificationMethods
|
||||
}
|
||||
|
@ -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(),
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
@ -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 ),)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue