init method

Future<void> init(
  1. String apiKey, {
  2. String? userId,
})

Implementation

Future<void> init(String apiKey, {String? userId}) async {
  Map<String, dynamic> properties = _baseProperties();
  properties['apiKey'] = apiKey;
  if (userId != null) {
    properties['userId'] = userId;
  }

  return await _channel.invokeMethod('init', jsonEncode(properties));
}