capture method
Implementation
Future<void> capture({
required String eventName,
Map<String, Object>? properties,
}) {
final propertiesCopy = properties == null ? null : {...properties};
final currentScreen = _currentScreen;
if (propertiesCopy != null &&
!propertiesCopy.containsKey('\$screen_name') &&
currentScreen != null) {
propertiesCopy['\$screen_name'] = currentScreen;
}
return _posthog.capture(
eventName: eventName,
properties: propertiesCopy,
);
}