Merge pull request #152 from yaso-meth/BUG--Bio-Auth-3

authenticate button of error message
This commit is contained in:
yaso-meth 2025-04-29 11:22:55 +02:00 committed by GitHub
commit 9f451f6736
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,24 +116,43 @@ class _BiometricCheckState extends State<BiometricCheck> {
alertBody: Column( alertBody: Column(
children: [ children: [
Text( Text(
"Hi there! To jump into the MIH Home Package, you'll need to set up biometric authentication (like fingerprint or face ID) on your device first. It looks like it's not quite ready yet.\n\nPlease head over to your device's settings to enable it, or press the button below to start the set up process now.", "Hi there! To jump into the MIH Home Package, you'll need to authenticate yourself with your phones biometrics, please set up biometric authentication (like fingerprint, face ID, pattern or pin) on your device first.\n\nIf you have already set up biometric authentication, press \"Authenticate now\" to try again or press \"Set Up Authentication\" to go to your device settings.",
style: TextStyle( style: TextStyle(
fontSize: 15,
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
), ),
), ),
const SizedBox(height: 20), const SizedBox(height: 20),
Wrap(
children: [
SizedBox(
width: 300,
child: MIHButton(
onTap: () {
AppSettings.openAppSettings(
type: AppSettingsType.security,
);
Navigator.of(context).pop();
},
buttonText: "Set Up Authentication",
buttonColor:
MzanziInnovationHub.of(context)!.theme.successColor(),
textColor:
MzanziInnovationHub.of(context)!.theme.primaryColor(),
),
),
],
),
SizedBox( SizedBox(
width: 300, width: 300,
child: MIHButton( child: MIHButton(
onTap: () { onTap: () {
AppSettings.openAppSettings(
type: AppSettingsType.security,
);
Navigator.of(context).pop(); Navigator.of(context).pop();
authenticateUser();
}, },
buttonText: "Set Up Authentication", buttonText: "Authenticate Now",
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.successColor(), MzanziInnovationHub.of(context)!.theme.secondaryColor(),
textColor: MzanziInnovationHub.of(context)!.theme.primaryColor(), textColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
), ),
) )
@ -205,7 +224,7 @@ class _BiometricCheckState extends State<BiometricCheck> {
width: 500.0, width: 500.0,
height: 50.0, height: 50.0,
child: MIHButton( child: MIHButton(
buttonText: "Unlock", buttonText: "Authenticate Now",
buttonColor: MzanziInnovationHub.of(context)! buttonColor: MzanziInnovationHub.of(context)!
.theme .theme
.secondaryColor(), .secondaryColor(),