fireEvent method
Simulates a widget lifecycle/telemetry event from the page, by its
bridge wire name — decoded through the same mapFeedBridgeEvent the
real FeedPlacement uses internally, so fireEvent('fill') behaves
like a real fill message rather than requiring the caller to know the
TeadsAdEvent it maps to. A name mapFeedBridgeEvent can't map is
reported via fireUnsupported instead, matching FeedPlacement's own
internal fallback for an unrecognised bridge event.
Implementation
void fireEvent(String name, [Map<String, dynamic>? data]) {
eventCallCount++;
if (mapFeedBridgeEvent(name, data) case (final event, final payload)) {
widget.onEvent?.call(event, payload);
return;
}
fireUnsupported('unrecognised bridge event: $name');
}