BeforeSendCallback typedef
BeforeSendCallback =
FutureOr<PostHogEvent?> Function(PostHogEvent event)
Callback to intercept and modify events before they are sent to PostHog.
The event argument contains the event name and user-provided properties
that are about to be captured. Return a possibly modified event to send it,
or return null to drop it.
Callbacks can be synchronous or asynchronous (returning
FutureOr<PostHogEvent?>).
Implementation
typedef BeforeSendCallback = FutureOr<PostHogEvent?> Function(
PostHogEvent event,
);