setUseIpAddressForGeolocation method
- 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.
useIpAddressForGeolocationwhether to automatically send the client IP Address. Defaults to true.
Implementation
void setUseIpAddressForGeolocation(bool useIpAddressForGeolocation) {
// ignore: unnecessary_null_comparison
if (useIpAddressForGeolocation != null) {
_channel.invokeMethod<void>(
'setUseIpAddressForGeolocation', <String, dynamic>{
'useIpAddressForGeolocation': useIpAddressForGeolocation
});
} else {
developer.log(
'`setUseIpAddressForGeolocation` failed: useIpAddressForGeolocation cannot be blank',
name: 'Mixpanel');
}
}