configure static method

Future<bool> configure(
  1. NamiConfiguration namiConfiguration
)

This method configures and initializes the SDK. This method must be called as the first thing before interacting with the SDK.

Implementation

static Future<bool> configure(NamiConfiguration namiConfiguration) {
  var extraDataList = ["extendedClientInfo:flutter:1.0.0"];
  extraDataList.addAll(namiConfiguration.extraData ?? []);
  var variableMap = {
    'appPlatformIDApple': namiConfiguration.appPlatformIDApple,
    "appPlatformIDGoogle": namiConfiguration.appPlatformIDGoogle,
    "bypassStore": namiConfiguration.bypassStore,
    "developmentMode": namiConfiguration.developmentMode,
    "passiveMode": namiConfiguration.passiveMode,
    "namiLogLevel": describeEnum(namiConfiguration.namiLogLevel),
    "extraDataList": extraDataList
  };
  return channel
      .invokeMethod<bool>("configure", variableMap)
      .then<bool>((bool? value) => value ?? false);
}