screen method
Implementation
@override
Future<void> screen({
required String screenName,
Map<String, Object>? properties,
}) async {
// The screen name argument wins over a properties `$screen_name`.
// beforeSend still runs after this and can change the name.
final propsWithScreenName = _withWebContext({
...?properties,
PostHogPropertyName.screenName: screenName,
});
return _order.event(
() => _runBeforeSend(PostHogEventName.screen, propsWithScreenName),
(processedEvent) => _sendScreen(screenName, processedEvent),
);
}