init method
Initializes an instance of the API with the given project token.
token
your project token.optOutTrackingDefault
Optional Whether or not Mixpanel can start tracking by default. See optOutTracking()
Implementation
static Future<Mixpanel> init(String token,
{bool optOutTrackingDefault = false}) async {
var properties = <String, dynamic>{'token': token};
if (optOutTrackingDefault != null) {
properties['optOutTrackingDefault'] = optOutTrackingDefault;
}
properties['mixpanelProperties'] = _mixpanelProperties;
await _channel.invokeMethod<void>('initialize', properties);
return Mixpanel(token);
}