setUseIpAddressForGeolocation method Null safety

void setUseIpAddressForGeolocation(
  1. bool useIpAddressForGeolocation

This controls whether to automatically send the client IP Address as part of event tracking. With an IP address, geo-location is possible down to neighborhoods within a city, although the Mixpanel Dashboard will just show you city level location specificity.

  • useIpAddressForGeolocation whether to automatically send the client IP Address. Defaults to true.


void setUseIpAddressForGeolocation(bool useIpAddressForGeolocation) {
  if (useIpAddressForGeolocation != null) { // ignore: unnecessary_null_comparison
        <String, dynamic>{'useIpAddressForGeolocation': useIpAddressForGeolocation});
  } else {
        '`setUseIpAddressForGeolocation` failed: useIpAddressForGeolocation cannot be blank',
        name: 'Mixpanel');