SelfRank class

Constructors

SelfRank({int? costCents, String? handle, bool? listed, int? metric, int? ofTotal, int? rank, bool? ranked, int? requests, int? tokens})
Returns a new SelfRank instance.

Properties

costCents ↔ int?
CostCents is the caller's own spend in whole US cents. Always populated — your own spend is never withheld from you — so here 0 really does mean zero.
getter/setter pair
handle ↔ String?
Handle is how the caller appears on this board: their chosen handle, falling back to their username, on a user board; their org id on the global board. Present even when unlisted — this is the caller looking at themselves.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
listed ↔ bool?
Listed says whether the caller is publicly visible on this board: opted in on a user board, org opted in (or the viewer is a platform admin) on the global one. False is the prompt to offer the opt-in, and explains an unranked global self.
getter/setter pair
metric ↔ int?
Metric is whichever of the three values above the board was ranked by, so a client can compare the caller against the rows without re-reading the request. Metric <= 0 is exactly the case that leaves Ranked false.
getter/setter pair
ofTotal ↔ int?
OfTotal is the size of the universe Rank is out of — "rank N of OfTotal". On a user board that is the org's users with any usage in the window; on the global board it is every active org for a platform admin, and the count of opted-in orgs for everyone else.
getter/setter pair
rank ↔ int?
Rank is the caller's 1-based standing, computed as (subjects whose windowed metric strictly exceeds the caller's) + 1. It is exact against the whole ranked universe, not just the returned page, so it can far exceed len(rows). Read it only when Ranked.
getter/setter pair
ranked ↔ bool?
Ranked is false when the caller holds no position: they had no usage in the window, or (on the global board) their org has not opted into public listing and so is not ranked against a set it never joined. Rank is then 0 and means nothing.
getter/setter pair
requests ↔ int?
Requests is the caller's own request count in the window, 0 if they were idle.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tokens ↔ int?
Tokens is the caller's own prompt+completion tokens in the 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) → SelfRank?
Returns a new SelfRank instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<SelfRank>
mapFromJson(dynamic json) → Map<String, SelfRank>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<SelfRank>>

Constants

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