Merge branch 'master' into 'develop'
# Conflicts: # lib/routes.dartmerge-requests/6/head
commit
31c4692594
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"commentBox.styles": {
|
||||||
|
"defaultStyle": {
|
||||||
|
"commentStartToken": "/* \n *@author: Elham Rababah \n *@Date:13/4/1993 \n *@param: \n *@return:\n *@desc: ",
|
||||||
|
"commentEndToken": "\n */",
|
||||||
|
"leftEdgeToken": " * ",
|
||||||
|
"rightEdgeToken": "",
|
||||||
|
"topEdgeToken": "",
|
||||||
|
"bottomEdgeToken": "",
|
||||||
|
"topRightToken": "",
|
||||||
|
"bottomLeftToken": "",
|
||||||
|
"capitalize": false,
|
||||||
|
"textAlignment": "left"
|
||||||
|
}}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1 +1,7 @@
|
|||||||
enum loginType { knownUser, unknownUser, changePassword, verifyPassword }
|
enum loginType {
|
||||||
|
knownUser,
|
||||||
|
unknownUser,
|
||||||
|
changePassword,
|
||||||
|
verifyPassword,
|
||||||
|
verificationMethods
|
||||||
|
}
|
||||||
|
|||||||
@ -0,0 +1,32 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../lookups/auth_lookup.dart';
|
||||||
|
import '../../widgets/auth/auth_header.dart';
|
||||||
|
import '../../widgets/auth/verification_methods.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(
|
||||||
|
body: ListView(children: <Widget>[
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
AuthHeader(loginType.verificationMethods),
|
||||||
|
VerificationMethods(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,24 +1,27 @@
|
|||||||
import 'package:doctor_app_flutter/lookups/auth_lookup.dart';
|
|
||||||
import 'package:doctor_app_flutter/widgets/auth/auth_header.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../lookups/auth_lookup.dart';
|
||||||
|
import '../../widgets/auth/auth_header.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) {
|
||||||
// return Container()];
|
// return Container()];
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
body: SafeArea(
|
||||||
body: SingleChildScrollView(
|
child: ListView(children: <Widget>[
|
||||||
child: Container(
|
Container(
|
||||||
margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 0),
|
margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
AuthHeader(loginType.verifyPassword),
|
AuthHeader(loginType.verifyPassword),
|
||||||
// ChangePassword(),
|
VerifyAccount(),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
),
|
),
|
||||||
));
|
),
|
||||||
|
]),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,59 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
/*
|
||||||
|
*@author: Elham Rababah
|
||||||
|
*@Date:12/4/2020
|
||||||
|
*@param:
|
||||||
|
*@return:
|
||||||
|
*@desc: This class will contian some Function will help developer
|
||||||
|
*/
|
||||||
|
class Helpers {
|
||||||
|
/*
|
||||||
|
*@author: Elham Rababah
|
||||||
|
*@Date:12/4/2020
|
||||||
|
*@param: context, items, decKey, onSelectFun
|
||||||
|
*@return: Container Widget
|
||||||
|
*@desc: showCupertinoPicker its a general function to show cupertino picker
|
||||||
|
*/
|
||||||
|
showCupertinoPicker(context, items, decKey, onSelectFun) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext builder) {
|
||||||
|
return Container(
|
||||||
|
height: SizeConfig.realScreenHeight * .3,
|
||||||
|
child: buildPickerItems(context, items, decKey, onSelectFun));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*@author: Elham Rababah
|
||||||
|
*@Date:12/4/2020
|
||||||
|
*@param: context, List items, decKey, onSelectFun
|
||||||
|
*@return: Container widget
|
||||||
|
*@desc: buildPickerIterm this function will build the items of the cupertino
|
||||||
|
*/
|
||||||
|
buildPickerItems(context, List items, decKey, onSelectFun) {
|
||||||
|
return Container(
|
||||||
|
child: CupertinoPicker(
|
||||||
|
magnification: 1.5,
|
||||||
|
// backgroundColor: Colors.black87,
|
||||||
|
children: items.map((item) {
|
||||||
|
return Text(
|
||||||
|
'${item["$decKey"]}',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Theme.of(context).primaryColor, fontSize: 20),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
|
||||||
|
itemExtent: 25, //height of each item
|
||||||
|
looping: true,
|
||||||
|
onSelectedItemChanged: (int index) {
|
||||||
|
// selectitem =index;
|
||||||
|
onSelectFun(index);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,169 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
import '../../config/size_config.dart';
|
||||||
|
import '../../routes.dart';
|
||||||
|
|
||||||
|
class VerifyAccount extends StatelessWidget {
|
||||||
|
final verifyAccountForm = GlobalKey<FormState>();
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Form(
|
||||||
|
key: verifyAccountForm,
|
||||||
|
child: Container(
|
||||||
|
width: SizeConfig.realScreenWidth * 0.90,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
buildSizedBox(30),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
width:SizeConfig.realScreenWidth*0.20,
|
||||||
|
child: TextFormField(
|
||||||
|
decoration: InputDecoration(
|
||||||
|
// ts/images/password_icon.png
|
||||||
|
contentPadding:
|
||||||
|
EdgeInsets.only(top: 30, bottom: 30),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(10)),
|
||||||
|
borderSide: BorderSide(color: Colors.black),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(10.0)),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: Theme.of(context).primaryColor),
|
||||||
|
)),
|
||||||
|
onChanged: (_) {},
|
||||||
|
)),
|
||||||
|
Container(
|
||||||
|
width:SizeConfig.realScreenWidth*0.20,
|
||||||
|
child: TextFormField(
|
||||||
|
decoration: InputDecoration(
|
||||||
|
// ts/images/password_icon.png
|
||||||
|
contentPadding:
|
||||||
|
EdgeInsets.only(top: 30, bottom: 30),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(10)),
|
||||||
|
borderSide: BorderSide(color: Colors.black),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(10.0)),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: Theme.of(context).primaryColor),
|
||||||
|
)),
|
||||||
|
onChanged: (_) {},
|
||||||
|
)),
|
||||||
|
Container(
|
||||||
|
width:SizeConfig.realScreenWidth*0.20,
|
||||||
|
child: TextFormField(
|
||||||
|
decoration: InputDecoration(
|
||||||
|
// ts/images/password_icon.png
|
||||||
|
contentPadding:
|
||||||
|
EdgeInsets.only(top: 30, bottom: 30),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(10)),
|
||||||
|
borderSide: BorderSide(color: Colors.black),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(10.0)),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: Theme.of(context).primaryColor),
|
||||||
|
)),
|
||||||
|
onChanged: (_) {},
|
||||||
|
)),
|
||||||
|
Container(
|
||||||
|
width:SizeConfig.realScreenWidth*0.20,
|
||||||
|
child: TextFormField(
|
||||||
|
decoration: InputDecoration(
|
||||||
|
// ts/images/password_icon.png
|
||||||
|
contentPadding:
|
||||||
|
EdgeInsets.only(top: 30, bottom: 30),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(10)),
|
||||||
|
borderSide: BorderSide(color: Colors.black),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(10.0)),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: Theme.of(context).primaryColor),
|
||||||
|
)),
|
||||||
|
onChanged: (_) {},
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// buildSizedBox(40),
|
||||||
|
buildSizedBox(20),
|
||||||
|
buildText(),
|
||||||
|
// buildSizedBox(10.0),
|
||||||
|
// Text()
|
||||||
|
|
||||||
|
buildSizedBox(40),
|
||||||
|
|
||||||
|
// buildSizedBox(),
|
||||||
|
RaisedButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pushNamed(HOME);
|
||||||
|
},
|
||||||
|
elevation: 0.0,
|
||||||
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 50,
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
'Verfiy'.toUpperCase(),
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 3 * SizeConfig.textMultiplier),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
side:
|
||||||
|
BorderSide(width: 0.5, color: Hexcolor('#CCCCCC'))),
|
||||||
|
),
|
||||||
|
buildSizedBox(20),
|
||||||
|
Center(
|
||||||
|
child: Text(
|
||||||
|
"Resend in 4.20",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 3.0 * SizeConfig.textMultiplier,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
buildSizedBox(10),
|
||||||
|
])));
|
||||||
|
}
|
||||||
|
|
||||||
|
RichText buildText() {
|
||||||
|
var text = RichText(
|
||||||
|
text: new TextSpan(
|
||||||
|
style: new TextStyle(
|
||||||
|
fontSize: 3.0 * SizeConfig.textMultiplier, color: Colors.black),
|
||||||
|
children: <TextSpan>[
|
||||||
|
new TextSpan(text: 'You will receive a '),
|
||||||
|
new TextSpan(
|
||||||
|
text: 'Login Code ',
|
||||||
|
style: TextStyle(fontWeight: FontWeight.w700)),
|
||||||
|
new TextSpan(text: 'By SMS, Please enter the code')
|
||||||
|
]));
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
SizedBox buildSizedBox([double height = 20]) {
|
||||||
|
return SizedBox(
|
||||||
|
height: height,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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