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:3.1.0"];
  extraDataList.addAll(namiConfiguration.extraData ?? []);
  var variableMap = {
    'appPlatformIdApple': namiConfiguration.appPlatformIdApple,
    "appPlatformIdAndroid": namiConfiguration.appPlatformIdAndroid,
    "namiLogLevel": describeEnum(namiConfiguration.namiLogLevel),
    "extraDataList": extraDataList
  };
  return channel
      .invokeMethod<bool>("configure", variableMap)
      .then<bool>((bool? value) => value ?? false);
}