launchSelphIDTestCaptureWithConfiguration method

Future<Either<Exception, SelphIdResult>> launchSelphIDTestCaptureWithConfiguration(
  1. {required SelphIDOperation operationMode,
  2. required String resourcesPath,
  3. required String license,
  4. required SelphIDConfiguration configuration,
  5. required String testImageName,
  6. required SelphIDTestType testType}
)

Implementation

Future<Either<Exception, SelphIdResult>>
    launchSelphIDTestCaptureWithConfiguration({
  required SelphIDOperation operationMode,
  required String resourcesPath,
  required String license,
  required SelphIDConfiguration configuration,
  required String testImageName,
  required SelphIDTestType testType,
}) async {
  try {
    final Map<dynamic, dynamic> resultJson =
        await SelphidPlugin.startSelphIDTestImageWidget(
      operationMode: operationMode,
      resourcesPath: resourcesPath,
      widgetLicense: license,
      previousOCRData: '',
      widgetConfigurationJSON: configuration,
      testImageName: testImageName,
      testType: testType,
    );

    return Right(
      SelphIdResult.fromMap(resultJson),
    );
  } on Exception catch (exception) {
    return Left(
      exception,
    );
  }
}