launchSelphiAuthenticateWithConfiguration method

Future<Either<Exception, SelphiFaceResult>> launchSelphiAuthenticateWithConfiguration(
  1. {required String resourcesPath,
  2. required SelphiFaceConfiguration configuration}
)

Implementation

Future<Either<Exception, SelphiFaceResult>>
    launchSelphiAuthenticateWithConfiguration({
  required String resourcesPath,
  required SelphiFaceConfiguration configuration,
}) async {
  try {
    final Map<dynamic, dynamic> resultJson =
        await SelphiFacePlugin.startSelphiFaceWidget(
      resourcesPath: resourcesPath,
      widgetConfigurationJSON: configuration,
    );

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