verifyKYCDocument method

  1. @override
Future<String?> verifyKYCDocument(
  1. String imagePath,
  2. String documentType
)
override

Detect KYC data in the given image and return JSON response.

Implementation

@override
Future<String?> verifyKYCDocument(
    String imagePath, String documentType) async {
  try {
    final String? result = await methodChannel.invokeMethod(
        'verifyKYCDocument',
        {'imagePath': imagePath, 'docType': documentType});
    return result;
  } on PlatformException catch (e) {
    // Handle errors from the platform side
    if (kDebugMode) {
      print('Error in verifyKYCDocument: ${e.message}');
    }
    return null;
  }
}