init static method

  1. @Deprecated('Use initWithConfig instead')
Future<String?> init(
  1. String serverUrl,
  2. String appKey, [
  3. String? deviceId
])

Implementation

@Deprecated('Use initWithConfig instead')
static Future<String?> init(String serverUrl, String appKey, [String? deviceId]) async {
  log('Calling "init" with serverURL: $serverUrl and appKey: $appKey');
  log('init is deprecated, use initWithConfig instead', logLevel: LogLevel.WARNING);
  CountlyConfig config = CountlyConfig(serverUrl, appKey);
  if (deviceId != null) {
    config.setDeviceId(deviceId);
  }
  return await initWithConfig(config);
}