setLoggingEnabled method Null safety

void setLoggingEnabled(
  1. bool loggingEnabled

This allows enabling or disabling of all Mixpanel logs at run time. 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


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