|
|
|
@ -114,13 +114,13 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
} else {
|
|
|
|
|
return SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: SizeConfig.realScreenHeight,
|
|
|
|
|
height: SizeConfig.realScreenHeight * .9,
|
|
|
|
|
width: SizeConfig.realScreenWidth,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
// height: SizeConfig.realScreenHeight * 0.6,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
user != null && isMoreOption == false
|
|
|
|
@ -130,13 +130,13 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(TranslationBase.of(context)
|
|
|
|
|
.welcomeBack),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.welcomeBack +
|
|
|
|
|
' ' +
|
|
|
|
|
user.doctorName,
|
|
|
|
|
Helpers.capitalize(user.doctorName),
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 3.5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
@ -145,55 +145,86 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
TranslationBase.of(context).accountInfo,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 2.5,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
Card(
|
|
|
|
|
color: Colors.grey[300],
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Flexible(
|
|
|
|
|
flex: 4,
|
|
|
|
|
child: ListTile(
|
|
|
|
|
title: Text(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.lastLoginAt,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
overflow:
|
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
|
),
|
|
|
|
|
subtitle: Text(
|
|
|
|
|
user.editedOn != null
|
|
|
|
|
? formatDate(Helpers
|
|
|
|
|
.convertStringToDate(
|
|
|
|
|
user.editedOn))
|
|
|
|
|
: user.createdOn != null
|
|
|
|
|
? formatDate(Helpers
|
|
|
|
|
.convertStringToDate(user
|
|
|
|
|
.createdOn))
|
|
|
|
|
: '--',
|
|
|
|
|
overflow:
|
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
|
textAlign:
|
|
|
|
|
TextAlign.center),
|
|
|
|
|
)),
|
|
|
|
|
title: Text(
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.lastLoginAt,
|
|
|
|
|
overflow: TextOverflow
|
|
|
|
|
.ellipsis,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
subtitle: AppText(
|
|
|
|
|
getType(
|
|
|
|
|
user.logInTypeID,
|
|
|
|
|
context),
|
|
|
|
|
)
|
|
|
|
|
// Text(
|
|
|
|
|
// user.editedOn != null
|
|
|
|
|
// ? formatDate(Helpers
|
|
|
|
|
// .convertStringToDate(
|
|
|
|
|
// user.editedOn))
|
|
|
|
|
// : user.createdOn != null
|
|
|
|
|
// ? formatDate(Helpers
|
|
|
|
|
// .convertStringToDate(user
|
|
|
|
|
// .createdOn))
|
|
|
|
|
// : '--',
|
|
|
|
|
// overflow:
|
|
|
|
|
// TextOverflow.ellipsis,
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontFamily: 'Poppins'),
|
|
|
|
|
// textAlign:
|
|
|
|
|
// TextAlign.center),
|
|
|
|
|
)),
|
|
|
|
|
Flexible(
|
|
|
|
|
flex: 2,
|
|
|
|
|
child: ListTile(
|
|
|
|
|
title: Text(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.lastLoginWith,
|
|
|
|
|
overflow:
|
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
|
textAlign:
|
|
|
|
|
TextAlign.center),
|
|
|
|
|
subtitle: Text(
|
|
|
|
|
getType(user.logInTypeID,
|
|
|
|
|
context),
|
|
|
|
|
overflow:
|
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
|
textAlign:
|
|
|
|
|
TextAlign.center),
|
|
|
|
|
))
|
|
|
|
|
title: AppText(
|
|
|
|
|
user.editedOn != null
|
|
|
|
|
? getDate(Helpers
|
|
|
|
|
.convertStringToDate(
|
|
|
|
|
user
|
|
|
|
|
.editedOn))
|
|
|
|
|
: user.createdOn !=
|
|
|
|
|
null
|
|
|
|
|
? getDate(Helpers
|
|
|
|
|
.convertStringToDate(
|
|
|
|
|
user.createdOn))
|
|
|
|
|
: '--',
|
|
|
|
|
textAlign:
|
|
|
|
|
TextAlign.right,
|
|
|
|
|
),
|
|
|
|
|
subtitle: AppText(
|
|
|
|
|
user.editedOn != null
|
|
|
|
|
? getTime(Helpers
|
|
|
|
|
.convertStringToDate(
|
|
|
|
|
user
|
|
|
|
|
.editedOn))
|
|
|
|
|
: user.createdOn !=
|
|
|
|
|
null
|
|
|
|
|
? getTime(Helpers
|
|
|
|
|
.convertStringToDate(
|
|
|
|
|
user.createdOn))
|
|
|
|
|
: '--',
|
|
|
|
|
textAlign:
|
|
|
|
|
TextAlign.right,
|
|
|
|
|
),
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
@ -232,6 +263,11 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child:
|
|
|
|
|
// getButton(3, authProv)),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: getButton(4, authProv))
|
|
|
|
|
Expanded(
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () => {
|
|
|
|
@ -243,7 +279,17 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
authProv))),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: getButton(5, authProv))
|
|
|
|
|
])
|
|
|
|
|
]),
|
|
|
|
|
// Row(
|
|
|
|
|
// mainAxisAlignment:
|
|
|
|
|
// MainAxisAlignment.center,
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: getButton(1, authProv)),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: getButton(2, authProv))
|
|
|
|
|
// ],
|
|
|
|
|
// )
|
|
|
|
|
])
|
|
|
|
|
: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
@ -290,6 +336,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
child: Button(
|
|
|
|
|
title: TranslationBase.of(context)
|
|
|
|
|
.useAnotherAccount,
|
|
|
|
|
color: Colors.red[700],
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.of(context).pushNamed(LOGIN);
|
|
|
|
|
},
|
|
|
|
@ -424,25 +471,33 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
case 2:
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () => {authenticateUser(2, true, authProv)},
|
|
|
|
|
child: RoundedContainer(
|
|
|
|
|
borderColor: Colors.grey,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(30, 15, 30, 15),
|
|
|
|
|
padding: EdgeInsets.fromLTRB(20, 15, 20, 15),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/login/104.png',
|
|
|
|
|
height: SizeConfig.imageSizeMultiplier * 13,
|
|
|
|
|
width: SizeConfig.imageSizeMultiplier * 16,
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/verify-whtsapp.png',
|
|
|
|
|
height: SizeConfig.imageSizeMultiplier * 13,
|
|
|
|
|
width: SizeConfig.imageSizeMultiplier * 16,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).verifyWhatsApp,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.2,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -451,16 +506,20 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
case 1:
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () => {authenticateUser(1, true, authProv)},
|
|
|
|
|
child: RoundedContainer(
|
|
|
|
|
borderColor: Colors.grey,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(5, 15, 5, 15),
|
|
|
|
|
padding: EdgeInsets.fromLTRB(20, 15, 20, 15),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/login/103.png',
|
|
|
|
|
'assets/images/verify-sms.png',
|
|
|
|
|
height: SizeConfig.imageSizeMultiplier * 13,
|
|
|
|
|
width: SizeConfig.imageSizeMultiplier * 16,
|
|
|
|
|
),
|
|
|
|
@ -475,8 +534,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
TranslationBase.of(context).verifySMS,
|
|
|
|
|
fontSize: projectsProvider.isArabic
|
|
|
|
|
? SizeConfig.textMultiplier * 1.8
|
|
|
|
|
: SizeConfig.textMultiplier * 2,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
: SizeConfig.textMultiplier * 2.2,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -488,19 +546,20 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
if (checkIfBiometricAvailable(BiometricType.fingerprint))
|
|
|
|
|
{authenticateUser(3, true, authProv)}
|
|
|
|
|
},
|
|
|
|
|
child: RoundedContainer(
|
|
|
|
|
backgroundColor:
|
|
|
|
|
checkIfBiometricAvailable(BiometricType.fingerprint)
|
|
|
|
|
? Colors.white
|
|
|
|
|
: Colors.white.withOpacity(.7),
|
|
|
|
|
borderColor: Colors.grey,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(5, 15, 5, 15),
|
|
|
|
|
padding: EdgeInsets.fromLTRB(20, 15, 20, 15),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/login/102.png',
|
|
|
|
|
'assets/images/verification_fingerprint_icon.png',
|
|
|
|
|
height: SizeConfig.imageSizeMultiplier * 13,
|
|
|
|
|
width: SizeConfig.imageSizeMultiplier * 16,
|
|
|
|
|
),
|
|
|
|
@ -509,8 +568,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).verifyFingerprint,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.2,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -523,33 +581,40 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
authenticateUser(4, true, authProv);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
child: RoundedContainer(
|
|
|
|
|
backgroundColor: checkIfBiometricAvailable(BiometricType.face)
|
|
|
|
|
? Colors.white
|
|
|
|
|
: Colors.white.withOpacity(.7),
|
|
|
|
|
borderColor: Colors.grey,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(5, 15, 5, 15),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/login/101.png',
|
|
|
|
|
height: SizeConfig.imageSizeMultiplier * 13,
|
|
|
|
|
width: SizeConfig.imageSizeMultiplier * 16,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
child:
|
|
|
|
|
// RoundedContainer(
|
|
|
|
|
// backgroundColor: checkIfBiometricAvailable(BiometricType.face)
|
|
|
|
|
// ? Colors.white
|
|
|
|
|
// : Colors.white.withOpacity(.7),
|
|
|
|
|
// borderColor: Colors.grey,
|
|
|
|
|
// showBorder: false,
|
|
|
|
|
Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(20, 15, 20, 15),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/verification_faceid_icon.png',
|
|
|
|
|
height: SizeConfig.imageSizeMultiplier * 13,
|
|
|
|
|
width: SizeConfig.imageSizeMultiplier * 16,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).verifyFaceID,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.2,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).verifyFaceID,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)));
|
|
|
|
|
)));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
@ -559,13 +624,19 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
isMoreOption = true;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
child: RoundedContainer(
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
borderColor: Colors.grey,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
child: Container(
|
|
|
|
|
// backgroundColor: Colors.white,
|
|
|
|
|
// borderColor: Colors.grey,
|
|
|
|
|
// showBorder: false,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(5, 0, 5, 5),
|
|
|
|
|
padding: EdgeInsets.fromLTRB(20, 15, 20, 15),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/login/more_icon.png',
|
|
|
|
@ -574,15 +645,15 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
),
|
|
|
|
|
projectsProvider.isArabic
|
|
|
|
|
? SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
height: 20,
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).moreVerification,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.2,
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -800,4 +871,16 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
helpers.showErrorToast(err);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getDate(DateTime date) {
|
|
|
|
|
final DateFormat formatter = DateFormat('dd MMM yyyy');
|
|
|
|
|
|
|
|
|
|
return formatter.format(date);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getTime(DateTime date) {
|
|
|
|
|
final DateFormat formatter = DateFormat('HH:mm a');
|
|
|
|
|
|
|
|
|
|
return formatter.format(date);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|