getTouchIDAuthenticationAllowableReuseDuration method
Retrieves the allowable reuse duration for Touch ID authentication (iOS only).
On iOS, this method allows you to retrieve the allowable duration for reusing a previously authenticated Touch ID (fingerprint) to unlock an app or perform secure actions. This duration is specified in seconds.
This method is applicable only to iOS platforms. On other platforms, it returns 0.0
.
Returns a Future with a double
value representing the allowable reuse
duration. If the operation is successful, it returns the specified duration
value previously set using setTouchIDAuthenticationAllowableReuseDuration.
If the method is not supported on the current platform or no duration has
been set, it returns 0.0
.
Throws an exception if there's an issue with retrieving the allowable reuse duration or if it's not supported on the current platform.
Implementation
@override
Future<double> getTouchIDAuthenticationAllowableReuseDuration() async {
return await methodChannel.invokeMethod<double>(
'getTouchIDAuthenticationAllowableReuseDuration') ??
0.0;
}