addEvent method

  1. @override
Future<void> addEvent(
  1. String? event,
  2. String? group,
  3. Map<String, dynamic>? properties
)
override

Implementation

@override
Future<void> addEvent(
    String? event, String? group, Map<String, dynamic>? properties) async {
  if (event == null || group == null) {
    return;
  }
  if (Platform.isIOS) {
    properties ??= {};
    methodChannel.invokeMethod<void>('addEvent', {"event": event, "group": group, "properties": properties});
  } else if (Platform.isAndroid) {
    methodChannel.invokeMethod<void>('addEvent',
        {"event": event, "group": group, "properties": properties});
  }
}