Ad
Customize The Native Alert Dialog In Flutter Applicaton For IOS Or Android For Face Id Implementation
Below is the method to authenticate biometric access in flutter application which is successfully implemented. If the error happens it shows a alert dialog box as shown in the image in iOS application, I want to customize this alert dialog box, how can I do that?
this alert dialog is only shown when useErrorDialogs
is set to true
as in the below code.
this is referred from Face Id Lock Implementation in Flutter
Future<void> _authenticateUser() async {
bool isAuthenticated = false;
try {
isAuthenticated = await _localAuthentication.authenticateWithBiometrics(
localizedReason:
"Please authenticate to view your transaction overview",
useErrorDialogs: true,
stickyAuth: true,
);
} on PlatformException catch (e) {
print(e);
}
if (!mounted) return;
isAuthenticated
? print('User is authenticated!')
: print('User is not authenticated.');
if (isAuthenticated) {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => TransactionScreen(),
),
);
}
}
Ad
Answer
You can't change it. For security reasons, the whole biometric authentication process is handled by iOS outside your app.
Ad
source: stackoverflow.com
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View
Ad