initWithAppId method

Future<void> initWithAppId(
  1. String appId, {
  2. String? accountKey,
  3. String? apiEndpoint,
  4. String? chatEndpoint,
})

Implementation

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

  data["appId"] = appId;

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