ActivityTotals class

Constructors

ActivityTotals({int? activeDays, int? costCents, int? maxRequests, int? maxTokens, int? requests, int? tokens})
Returns a new ActivityTotals instance.

Properties

activeDays ↔ int?
ActiveDays counts the days with any usage at all — the streak/consistency number. Compare it against len(days) for the share of days the subject showed up.
getter/setter pair
costCents ↔ int?
CostCents is the window's spend in whole US cents, the sum of Days[].CostCents.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
maxRequests ↔ int?
MaxRequests is the same ceiling for a request-based heatmap — the busiest single day's request count, 0 for an idle window.
getter/setter pair
maxTokens ↔ int?
MaxTokens is the busiest single day's token count: the ceiling to normalize a token heatmap against, so the darkest cell is that day. 0 for an idle window, which a client must not divide by.
getter/setter pair
requests ↔ int?
Requests is the sum of Days[].Requests over the whole window.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tokens ↔ int?
Tokens is the sum of Days[].Tokens over the whole window.
getter/setter pair

Methods

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.
override

Operators

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

Static Methods

fromJson(dynamic value) → ActivityTotals?
Returns a new ActivityTotals instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<ActivityTotals>
mapFromJson(dynamic json) → Map<String, ActivityTotals>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<ActivityTotals>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.