verifyFront method

Future<VerificationResponse> verifyFront(
  1. String sessionId,
  2. String documentType,
  3. String countryCode,
  4. File photo,
)

Verify document front

Implementation

Future<VerificationResponse> verifyFront(
  String sessionId,
  String documentType,
  String countryCode,
  File photo,
) async {
  try {
    final Map<String, dynamic> response = await _plugin.verifyDocumentFront(
      sessionId,
      {
        'document_type': documentType,
        'document_country': countryCode,
        'photo': photo,
      },
    );
    return VerificationResponse.fromJson(response);
  } catch (e) {
    throw Exception('Failed to verify front: $e');
  }
}