FrequencyState class

Persisted per-campaign capping state. total (lifetime) and windowCount (current window) are tracked independently so a per-window cap never double-counts against FrequencyPolicy.maxTotal. Mirrors Android's FrequencyState.

Constructors

FrequencyState({int total = 0, int windowCount = 0, int? windowAnchorAt, String? sessionId, int? stoppedAt})
const

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionId String?
The session that owns the current session-window count (null otherwise).
final
stoppedAt int?
ms timestamp of the permanent stop (null while the campaign is still live).
final
total int
final
windowAnchorAt int?
ms timestamp anchoring the current time-based window (null for session / total-only policies).
final
windowCount int
final

Methods

copyWith({int? total, int? windowCount, int? windowAnchorAt, String? sessionId, int? stoppedAt}) FrequencyState
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromJson(Map<String, dynamic> json) FrequencyState