setLocationInit static method

  1. @Deprecated('This functions is deprecated, please use "setLocation" of CountlyConfig instead')
Future<String?> setLocationInit(
  1. String countryCode,
  2. String city,
  3. String gpsCoordinates,
  4. String ipAddress,
)

Set user initial location Should be call before init

Implementation

@Deprecated('This functions is deprecated, please use "setLocation" of CountlyConfig instead')
static Future<String?> setLocationInit(String countryCode, String city, String gpsCoordinates, String ipAddress) async {
  log('Calling "setLocationInit" with countryCode:[$countryCode], city:[$city], gpsCoordinates:[$gpsCoordinates], ipAddress:[$ipAddress]');
  log('setLocationInit is deprecated, use setLocation of CountlyConfig instead', logLevel: LogLevel.WARNING);

  List<String> args = [];
  args.add(countryCode);
  args.add(city);
  args.add(gpsCoordinates);
  args.add(ipAddress);

  final String? result = await _channel.invokeMethod('setLocationInit', <String, dynamic>{'data': json.encode(args)});

  return result;
}