|
|
|
|
@ -71,6 +71,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
|
_loggedUserFuture = getSharedPref();
|
|
|
|
|
_getAvailableBiometrics();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> getSharedPref() async {
|
|
|
|
|
@ -117,199 +118,188 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
height: SizeConfig.realScreenHeight * 0.6,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
user != null && isMoreOption == false
|
|
|
|
|
? Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.welcomeBack +
|
|
|
|
|
' ' +
|
|
|
|
|
user.doctorName,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 3.5,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
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(
|
|
|
|
|
// height: SizeConfig.realScreenHeight * 0.6,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
user != null && isMoreOption == false
|
|
|
|
|
? Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.welcomeBack +
|
|
|
|
|
' ' +
|
|
|
|
|
user.doctorName,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 3.5,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
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(Helpers
|
|
|
|
|
.convertStringToDate(
|
|
|
|
|
user.editedOn))
|
|
|
|
|
: user.createdOn != null
|
|
|
|
|
? formatDate(Helpers
|
|
|
|
|
.convertStringToDate(user
|
|
|
|
|
.createdOn))
|
|
|
|
|
: '--',
|
|
|
|
|
overflow:
|
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
|
textAlign:
|
|
|
|
|
TextAlign.center),
|
|
|
|
|
)),
|
|
|
|
|
Flexible(
|
|
|
|
|
child: ListTile(
|
|
|
|
|
title: Text(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.lastLoginAt,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
.lastLoginWith,
|
|
|
|
|
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),
|
|
|
|
|
)),
|
|
|
|
|
Flexible(
|
|
|
|
|
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),
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
this.onlySMSBox == false
|
|
|
|
|
? AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.verifyLoginWith,
|
|
|
|
|
fontSize: SizeConfig
|
|
|
|
|
.textMultiplier *
|
|
|
|
|
3.5,
|
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
|
)
|
|
|
|
|
: AppText(
|
|
|
|
|
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,
|
|
|
|
|
BiometricType
|
|
|
|
|
.face
|
|
|
|
|
.index,
|
|
|
|
|
authProv)
|
|
|
|
|
},
|
|
|
|
|
child: getButton(
|
|
|
|
|
user.logInTypeID,
|
|
|
|
|
authProv))),
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
getButton(5, authProv))
|
|
|
|
|
])
|
|
|
|
|
])
|
|
|
|
|
: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
onlySMSBox == false
|
|
|
|
|
? Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: getButton(
|
|
|
|
|
3, authProv)),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: getButton(
|
|
|
|
|
4, authProv))
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
Row(
|
|
|
|
|
textAlign:
|
|
|
|
|
TextAlign.center),
|
|
|
|
|
subtitle: Text(
|
|
|
|
|
getType(user.logInTypeID,
|
|
|
|
|
context),
|
|
|
|
|
overflow:
|
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
|
textAlign:
|
|
|
|
|
TextAlign.center),
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
this.onlySMSBox == false
|
|
|
|
|
? AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.verifyLoginWith,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
3.5,
|
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
|
)
|
|
|
|
|
: AppText(
|
|
|
|
|
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:
|
|
|
|
|
getButton(1, authProv)),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () => {
|
|
|
|
|
authenticateUser(
|
|
|
|
|
3,
|
|
|
|
|
BiometricType
|
|
|
|
|
.face.index,
|
|
|
|
|
authProv)
|
|
|
|
|
},
|
|
|
|
|
child: getButton(
|
|
|
|
|
user.logInTypeID,
|
|
|
|
|
authProv))),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: getButton(2, authProv))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
child: getButton(5, authProv))
|
|
|
|
|
])
|
|
|
|
|
])
|
|
|
|
|
: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
onlySMSBox == false
|
|
|
|
|
? Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: getButton(
|
|
|
|
|
3, authProv)),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: getButton(
|
|
|
|
|
4, authProv))
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: getButton(1, authProv)),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: getButton(2, authProv))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
user != null
|
|
|
|
|
? Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
user != null
|
|
|
|
|
? Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Button(
|
|
|
|
|
title:
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.useAnotherAccount,
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
.pushNamed(LOGIN);
|
|
|
|
|
},
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Button(
|
|
|
|
|
title: TranslationBase.of(context)
|
|
|
|
|
.useAnotherAccount,
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.of(context).pushNamed(LOGIN);
|
|
|
|
|
},
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
))
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
@ -499,9 +489,10 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
authenticateUser(3, BiometricType.fingerprint.index, authProv)
|
|
|
|
|
},
|
|
|
|
|
child: RoundedContainer(
|
|
|
|
|
backgroundColor: BiometricType.fingerprint.index == 1
|
|
|
|
|
? Colors.white
|
|
|
|
|
: Colors.white.withOpacity(.7),
|
|
|
|
|
backgroundColor:
|
|
|
|
|
checkIfBiometricAvailable(BiometricType.fingerprint)
|
|
|
|
|
? Colors.white
|
|
|
|
|
: Colors.white.withOpacity(.7),
|
|
|
|
|
borderColor: Colors.grey,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
child: Padding(
|
|
|
|
|
@ -566,9 +557,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
child: RoundedContainer(
|
|
|
|
|
backgroundColor: BiometricType.fingerprint.index == 1
|
|
|
|
|
? Colors.white
|
|
|
|
|
: Colors.white.withOpacity(.7),
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
borderColor: Colors.grey,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
child: Padding(
|
|
|
|
|
@ -756,11 +745,11 @@ class _VerificationMethodsState extends State<VerificationMethods> {
|
|
|
|
|
getDocProfiles(clinic, authProv);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
//changeLoadingStata(false);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
helpers.showErrorToast(res['ErrorEndUserMessage']);
|
|
|
|
|
}
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
//changeLoadingStata(false);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
helpers.showErrorToast(err);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|