setLoggingEnabled method
- bool loggingEnabled
This allows enabling or disabling of all Mixpanel logs at run time.
- Note: This method will only work for iOS. For android, please refer to: https://developer.mixpanel.com/docs/android All logging is disabled by default. Usually, this is only required if you are running into issues with the SDK that you want to debug
loggingEnabled
whether to enable logging
Implementation
void setLoggingEnabled(bool loggingEnabled) {
if (Platform.isIOS) {
if (loggingEnabled != null) {
_channel.invokeMethod<void>('setLoggingEnabled',
<String, dynamic>{'loggingEnabled': loggingEnabled});
} else {
developer.log(
'`setLoggingEnabled` failed: loggingEnabled cannot be blank',
name: 'Mixpanel');
}
}
}