invoke method

Future<bool> invoke({
  1. required String baseUrl,
  2. required String apiKey,
  3. bool? enableManualCapturingFallback,
  4. int? captureTimeout,
  5. int? maxCapturingWidth,
  6. int? maxCapturingHeight,
  7. String? warningAction,
  8. String? userName,
  9. String? phoneNumber,
  10. String? email,
  11. required dynamic onSuccess(
    1. InitializationResult
    ),
  12. required dynamic onFailed(
    1. DigifiedError
    ),
})

Implementation

Future<bool> invoke(
    {required String baseUrl,
    required String apiKey,
    bool? enableManualCapturingFallback,
    int? captureTimeout,
    int? maxCapturingWidth,
    int? maxCapturingHeight,
    String? warningAction,
    String? userName,
    String? phoneNumber,
    String? email,
    required Function(InitializationResult) onSuccess,
    required Function(DigifiedError) onFailed}) async {
  _onSuccess = onSuccess;
  _onFailed = onFailed;

  return sendToNative({
    InitializeConstants.baseUrl: baseUrl,
    InitializeConstants.apiKey: apiKey,
    InitializeConstants.enableManualCapturingFallback: enableManualCapturingFallback,
    InitializeConstants.captureTimeout: captureTimeout,
    InitializeConstants.maxCapturingWidth: maxCapturingWidth,
    InitializeConstants.maxCapturingHeight: maxCapturingHeight,
    InitializeConstants.warningAction: warningAction,
    InitializeConstants.userName: userName,
    InitializeConstants.phoneNumber: phoneNumber,
    InitializeConstants.email: email
  });
}