initialize static method

Future<String> initialize(
  1. String appId,
  2. String appKey,
  3. Region region
)

Initializes the HyperSnap SDK inside the client's application.

Parameters:

  • appId: The application ID provided by HyperVerge.co.
  • appKey: The application key provided by HyperVerge.co.
  • region: The region in which the SDK should be initialized. (e.g., Region.india)

Returns a Future that completes with a String value of "initialized" if the initialization is successful.

Implementation

static Future<String> initialize(
    String appId, String appKey, Region region) async {
  String result = "Not Initialized";
  try {
    result = await _hyperSnapSDKChannel
        .invokeMethod(HyperSnapSDKConstants.initialize, {
      HyperSnapSDKConstants.appId: appId,
      HyperSnapSDKConstants.appKey: appKey,
      HyperSnapSDKConstants.region: region.regionName,
    });
  } catch (e) {
    log(e.toString());
  }
  return result;
}