detectKYCDocument method

  1. @override
Future<String?> detectKYCDocument(
  1. String imagePath
)
override

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

Implementation

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