init static method

  1. @Deprecated('This function is deprecated, please use initWithConfig instead')
Future<String?> init(
  1. String serverUrl,
  2. String appKey, [
  3. String? deviceId
])

Implementation

@Deprecated('This function is deprecated, please 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);
}