|
|
|
|
@ -124,16 +124,16 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).welcomeBack,
|
|
|
|
|
style: TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64),
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
user.name.toLowerCase().capitalizeFirstofEach,
|
|
|
|
|
style: TextStyle(fontSize: 24, fontFamily: "Poppins", fontWeight: FontWeight.w700, color: Color(0xff2B353E), height: 1, letterSpacing: -1.44),
|
|
|
|
|
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2B353E), height: 1, letterSpacing: -1.44),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 10),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).accountInfo,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 25 / 16),
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 25 / 16),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: 72,
|
|
|
|
|
@ -157,7 +157,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).lastLoginAt.toCamelCase,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64),
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
user.editedOn != null
|
|
|
|
|
@ -165,7 +165,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
: user.createdOn != null
|
|
|
|
|
? DateUtil.formatDateToDate(DateUtil.convertStringToDate(user.createdOn))
|
|
|
|
|
: '--',
|
|
|
|
|
style: TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -177,7 +177,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
TranslationBase.of(context).lastLoginWith.toCamelCase,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
fontFamily: "Poppins",
|
|
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xff575757),
|
|
|
|
|
),
|
|
|
|
|
@ -186,7 +186,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
" " + getType(user.logInType, context),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontFamily: "Poppins",
|
|
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
|
),
|
|
|
|
|
@ -198,7 +198,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
: user.createdOn != null
|
|
|
|
|
? DateUtil.formatDateToTime(DateUtil.convertStringToDate(user.createdOn))
|
|
|
|
|
: '--',
|
|
|
|
|
style: TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48),
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
@ -207,7 +207,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).pleaseVerify,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64),
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64),
|
|
|
|
|
),
|
|
|
|
|
GridView(
|
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
|
|
|
|
|
@ -230,26 +230,32 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
height: 90,
|
|
|
|
|
width: 90,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 23),
|
|
|
|
|
this.onlySMSBox == false
|
|
|
|
|
? Texts(
|
|
|
|
|
? Text(
|
|
|
|
|
TranslationBase.of(context).verifyLoginWith,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 3.5,
|
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 25 / 16),
|
|
|
|
|
)
|
|
|
|
|
: Texts(
|
|
|
|
|
: Text(
|
|
|
|
|
TranslationBase.of(context).verifyFingerprint2,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 25 / 16),
|
|
|
|
|
),
|
|
|
|
|
onlySMSBox == false
|
|
|
|
|
? Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[Expanded(child: getButton(3)), Expanded(child: getButton(2))],
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[Expanded(child: getButton(1)), Expanded(child: getButton(4))],
|
|
|
|
|
SizedBox(height: 23),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).pleaseVerify,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64),
|
|
|
|
|
),
|
|
|
|
|
GridView(
|
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.only(top: 9),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
children: [
|
|
|
|
|
if (onlySMSBox == false) getButton(3),
|
|
|
|
|
if (onlySMSBox == false) getButton(2),
|
|
|
|
|
getButton(1),
|
|
|
|
|
getButton(4),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
],
|
|
|
|
|
@ -258,157 +264,14 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 43,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: FlatButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).pushNamed(LOGIN_TYPE);
|
|
|
|
|
},
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).useAnotherAccount,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48),
|
|
|
|
|
),
|
|
|
|
|
color: Color(0xffD02127),
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(6),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
DefaultButton(
|
|
|
|
|
TranslationBase.of(context).useAnotherAccount,
|
|
|
|
|
() => {Navigator.of(context).pushNamed(LOGIN_TYPE)},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
appBarTitle: TranslationBase.of(context).confirm,
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
isShowDecPage: false,
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(20),
|
|
|
|
|
height: SizeConfig.realScreenHeight * .9,
|
|
|
|
|
width: SizeConfig.realScreenWidth,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
user != null && isMoreOption == false
|
|
|
|
|
? Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/habib-logo.png',
|
|
|
|
|
height: 90,
|
|
|
|
|
width: 90,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).welcomeBack + ' ' + user.name,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 3.5,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).accountInfo,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
Card(
|
|
|
|
|
color: Colors.grey[300],
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Flexible(
|
|
|
|
|
child: ListTile(
|
|
|
|
|
title: Text(
|
|
|
|
|
TranslationBase.of(context).lastLoginAt,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
|
),
|
|
|
|
|
subtitle: Text(
|
|
|
|
|
user.editedOn != null
|
|
|
|
|
? formatDate(DateUtil.convertStringToDate(user.editedOn))
|
|
|
|
|
: user.createdOn != null
|
|
|
|
|
? formatDate(DateUtil.convertStringToDate(user.createdOn))
|
|
|
|
|
: '--',
|
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
|
textAlign: TextAlign.center),
|
|
|
|
|
)),
|
|
|
|
|
Flexible(
|
|
|
|
|
child: ListTile(
|
|
|
|
|
title: Text(TranslationBase.of(context).lastLoginWith, overflow: TextOverflow.ellipsis, textAlign: TextAlign.center),
|
|
|
|
|
subtitle: Text(getType(user.logInType, context), overflow: TextOverflow.ellipsis, textAlign: TextAlign.center),
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: Column(mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/habib-logo.png',
|
|
|
|
|
height: 90,
|
|
|
|
|
width: 90,
|
|
|
|
|
),
|
|
|
|
|
this.onlySMSBox == false
|
|
|
|
|
? Texts(
|
|
|
|
|
TranslationBase.of(context).verifyLoginWith,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 3.5,
|
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
|
)
|
|
|
|
|
: Texts(
|
|
|
|
|
TranslationBase.of(context).verifyFingerprint2,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
user != null && isMoreOption == false
|
|
|
|
|
? Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
|
|
|
|
|
Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
|
|
|
|
|
Expanded(child: InkWell(onTap: () => {authenticateUser(3, isActive: BiometricType.face.index)}, child: getButton(user.logInType))),
|
|
|
|
|
Expanded(child: getButton(5))
|
|
|
|
|
])
|
|
|
|
|
])
|
|
|
|
|
: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
|
|
|
|
|
onlySMSBox == false
|
|
|
|
|
? Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[Expanded(child: getButton(3)), Expanded(child: getButton(2))],
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[Expanded(child: getButton(1)), Expanded(child: getButton(4))],
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
user != null
|
|
|
|
|
? Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: DefaultButton(
|
|
|
|
|
TranslationBase.of(context).useAnotherAccount,
|
|
|
|
|
() => {
|
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
|
LOGIN_TYPE,
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> _getAvailableBiometrics() async {
|
|
|
|
|
@ -771,21 +634,25 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget _loginOptionButton(String _title, String _icon, int _flag, int _loginIndex) {
|
|
|
|
|
bool isDisable = (_flag == 3 && !checkIfBiometricAvailable(BiometricType.face));
|
|
|
|
|
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
if (_flag == 0) {
|
|
|
|
|
setState(() {
|
|
|
|
|
isMoreOption = true;
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
authenticateUser(4, isActive: _loginIndex);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onTap: isDisable
|
|
|
|
|
? null
|
|
|
|
|
: () {
|
|
|
|
|
if (_flag == 0) {
|
|
|
|
|
setState(() {
|
|
|
|
|
isMoreOption = true;
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
authenticateUser(_flag, isActive: _loginIndex);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(15),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
color: isDisable ? Colors.grey.withOpacity(0.3) : Colors.white,
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Color(0xffefefef),
|
|
|
|
|
width: 1,
|
|
|
|
|
@ -799,10 +666,12 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
_icon,
|
|
|
|
|
height: 38,
|
|
|
|
|
width: 38,
|
|
|
|
|
color: isDisable ? Color(0xff2B353E).withOpacity(0.7) : null,
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).verifyThrough + " " + _title,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 16, fontWeight: FontWeight.w600, color: isDisable ? Color(0xff2B353E).withOpacity(0.7) : Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|