captureWithLiveness method
Implementation
@override
Future<FaceCaptureResult?> captureWithLiveness(LivenessConfig config) async {
try {
final result = await methodChannel.invokeMapMethod<String, dynamic>(
'captureWithLiveness',
config.toMap(),
);
if (result == null) return null;
return FaceCaptureResult.fromMap(result);
} on PlatformException catch (e) {
if (e.code == 'CANCELLED') return null;
throw FaceCaptureException(e.code, e.message ?? '');
}
}