trackEvent static method

Future<void> trackEvent(
  1. String type, [
  2. Object? attributes
])

Sends an event with of type type and attributes of your choice.

Implementation

static Future<void> trackEvent(String type, [Object? attributes]) async {
  Map<String, Object?> args = <String, Object?>{};
  args.putIfAbsent("attributes", () => attributes);
  args.putIfAbsent("type", () => type);
  await _methodChannel.invokeMethod('trackEvent', args);
}