EngageLeaderboards class

Leaderboards published to the SDK (engage.leaderboards).

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

aroundMe(String leaderboardId, {int radius = 5, LeaderboardPeriod period = LeaderboardPeriod.current, String? segment}) → Future<LeaderboardPage>
Up to radius (1..25) entries above and below the current user; the user's entry has isMe. name/metric/segment are null. Cached for 60 s.
hostedPageUrl(String leaderboardId, {LeaderboardPeriod period = LeaderboardPeriod.current}) → Future<Uri>
A short-lived signed URL of the hosted leaderboard page that highlights the current user, for a web view. Never cached. Throws hosted_page_unavailable when the server returns no embed_url.
me(String leaderboardId, {LeaderboardPeriod period = LeaderboardPeriod.current, String? segment}) → Future<MyRank>
The current user's rank, score, pending count, gap to the next rank and period end (rank null while unranked). Cached for 60 s.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setOptOut({required String programId, required bool optOut}) → Future<void>
Hides (optOut true) or shows the current user on every board of a referral program. Clears the read cache.
top(String leaderboardId, {LeaderboardPeriod period = LeaderboardPeriod.current, String? segment, int limit = 50}) → Future<LeaderboardPage>
Top entries of leaderboardId (limit clamped to 1..100). Does not need an identified user. Cached for 60 s.
toString() → String
A string representation of this object.
inherited

Operators

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