smartfaceIdentifyActivity method
Future<void>
smartfaceIdentifyActivity({
- dynamic onIdentify(
- dynamic
- bool? keepIdentification,
- bool? enableCheckImageQuality = true,
- int? identifyTimeout,
- bool? livenessEnabled,
- double? livenessSecurityLevel,
- double? securityLevel,
- bool? saveImage = false,
- SmartfaceCameraPosition? cameraPosition,
Starts the native identification activity without embedding a Flutter
PlatformView.
Prefer identifyWidget when the Flutter app owns the surrounding screen. Use this method when the integration should delegate the full capture experience to the native layer.
Scale note:
securityLeveluses the public SmartfaceMobile scale from 0 to 100.livenessSecurityLevelalso uses 0 to 100.
Implementation
Future<void> smartfaceIdentifyActivity({
Function(dynamic)? onIdentify,
bool? keepIdentification,
bool? enableCheckImageQuality = true,
int? identifyTimeout,
bool? livenessEnabled,
double? livenessSecurityLevel,
double? securityLevel,
bool? saveImage = false,
SmartfaceCameraPosition? cameraPosition,
}) async {
registerCallback("onIdentify", onIdentify ?? (_) {});
await methodChannel.invokeMethod('smartfaceIdentifyActivity', {
'identifyCallBackId': 0,
'keepIdentification': keepIdentification,
'enableCheckImageQuality': enableCheckImageQuality,
'identifyTimeout': identifyTimeout,
'securityLevel': securityLevel,
'livenessEnabled': livenessEnabled,
'livenessSecurityLevel': livenessSecurityLevel,
'saveImage': saveImage,
'cameraSelected':
cameraPosition == SmartfaceCameraPosition.back ? "0" : "1",
});
}