startLiveness method

  1. @override
Future<EkycResult> startLiveness(
  1. KonnectedScanLivenessType livenessType,
  2. String? faceImageBase64
)
override

Implementation

@override
Future<EkycResult> startLiveness(
    KonnectedScanLivenessType livenessType, String? faceImageBase64) async {
  final arguments = {};
  arguments.putIfAbsent("livenessType", () => livenessType);
  arguments.putIfAbsent("faceImageBase64", () => faceImageBase64);

  try {
    final String result =
        await methodChannel.invokeMethod('konnectedScanLiveness', arguments);
    return ekycResultFromJson(result);
  } catch (e) {
    debugPrint(e.toString());
    return Future.value(EkycResult());
  }
}