init method

Future<void> init(
  1. String appId,
  2. String authKey,
  3. String authSecret,
  4. String accountKey, {
  5. String? apiEndpoint,
  6. String? chatEndpoint,
})

Implementation

Future<void> init(String appId, String authKey, String authSecret, String accountKey,
    {String? apiEndpoint, String? chatEndpoint}) async {
  Map<String, Object> data = Map();

  data["appId"] = appId;
  data["authKey"] = authKey;
  data["authSecret"] = authSecret;
  data["accountKey"] = accountKey;

  if (apiEndpoint != null) {
    data["apiEndpoint"] = apiEndpoint;
  }
  if (chatEndpoint != null) {
    data["chatEndpoint"] = chatEndpoint;
  }
  await _settingsModule.invokeMethod(INIT_METHOD, data);
}