capture method

Future<void> capture({
  1. required String eventName,
  2. Map<String, dynamic>? properties,
  3. Map<String, dynamic>? options,
})

Implementation

Future<void> capture({
  required String eventName,
  Map<String, dynamic>? properties,
  Map<String, dynamic>? options,
}) {
  if (properties != null &&
      !properties.containsKey('\$screen_name') &&
      this.currentScreen != null) {
    properties['\$screen_name'] = this.currentScreen;
  }
  return _posthog.capture(
    eventName: eventName,
    properties: properties,
    options: options,
  );
}