setThreshold method
- @Deprecated.new('Use setSecurityLevel instead. setThreshold expects the legacy normalized 0.0 to 1.0 scale.')
- double threshold
Sets the legacy normalized threshold for the Smartface Mobile platform.
This method accepts the older 0.0 to 1.0 ratio and converts it to the public 0 to 100 security level before forwarding it to the native layer.
Example:
await setThreshold(0.75);
This will set the security level to 75.00.
Implementation
@Deprecated(
'Use setSecurityLevel instead. setThreshold expects the legacy normalized 0.0 to 1.0 scale.',
)
Future<void> setThreshold(double threshold) async {
final floatThreshold = (threshold * 100).toStringAsFixed(2);
final parsedThreshold = double.parse(floatThreshold).toDouble();
await setSecurityLevel(parsedThreshold);
}