launch static method

Future<HyperKycResult> launch({
  1. required HyperKycConfig hyperKycConfig,
})

Launches the HyperKyc SDK using the provided HyperKycConfig instance.

This function initiates the HyperKyc SDK with the specified configuration provided through the hyperKycConfig parameter. It returns a Future that completes with a HyperKycResult representing the result of the SDK launch.

The HyperKycResult contains information about the outcome of the SDK operation. Please refer to the Hyperverge team's documentation for details on how to process the hyperKycResult and handle different scenarios.

Example usage:

HyperKycConfig config = HyperKycConfig(/* provide configuration parameters */);
HyperKycResult result = await HyperKycSDK.launch(hyperKycConfig: config);
print('HyperKyc SDK Launch Result: $result');

Returns a Future that completes with the HyperKycResult of the SDK launch.

Implementation

static Future<HyperKycResult> launch(
    {required HyperKycConfig hyperKycConfig}) async {
  Map hyperKycResultMap = {};
  HyperKycResult hyperKycResult = HyperKycResult();
  try {
    hyperKycResultMap = await _channel.invokeMethod(
      HyperKycConstants.launch,
      {
        HyperKycConstants.hyperKycConfig: hyperKycConfig.toMap(),
      },
    );
    hyperKycResult = HyperKycResult.fromMap(hyperKycResultMap);
  } catch (e) {
    log(e.toString());
  }
  return hyperKycResult;
}