start static method

Future<void> start(
  1. String token,
  2. List<InvocationEvent> invocationEvents
)

Starts the SDK. This is the main SDK method that does all the magic. This is the only method that SHOULD be called. The token that identifies the app, you can find it on your dashboard. The invocationEvents are the events that invoke the SDK's UI.

Implementation

static Future<void> start(
    String token, List<InvocationEvent> invocationEvents) async {
  if (PlatformManager.instance.isIOS()) {
    final List<String> invocationEventsStrings =
        invocationEvents.map((e) => e.toString()).toList(growable: false);
    final List<dynamic> params = <dynamic>[token, invocationEventsStrings];
    await _channel.invokeMethod<Object>(
        'startWithToken:invocationEvents:', params);
  }
}