flush method Null safety

void flush()

Push all queued Mixpanel events and People Analytics changes to Mixpanel servers.

Events and People messages are pushed gradually throughout the lifetime of your application. This means that to ensure that all messages are sent to Mixpanel when your application is shut down, you will need to call flush() to let the Mixpanel library know it should send all remaining messages to the server.

Implementation

void flush() {
  _channel.invokeMethod('flush');
}