engage library
Clikgate Engage features (part of clikgate_flutter since 2.1.0; Dart, and
the share menu uses the native SDK's Engage features) for
apps without their own backend: the user's referral link and stats,
leaderboards, promo codes and share helpers.
Apps with a backend should call the Clikgate control-plane API from their server instead (recommended path; see docs/engage.md).
Classes
- ClikgateCoreBridge
-
EngageCore over the
clikgate_flutterplugin. - ClikgateEngage
- Clikgate Engage (part of clikgate_flutter) for apps without their own backend: the user's referral link and stats, leaderboards, promo codes and share helpers.
- ClikgateEngageErrors
-
Error codes specific to the Engage features. Errors are thrown as
ClikgateException(fromclikgate_flutter) with these codes, the backend's codes (referrer_not_found,leaderboard_not_found,code_not_found,code_expired,identity_required, ...) or the core codes (feature_disabled,not_configured,install_pending,opted_out,network_error,timeout,invalid_argument). - EngageCodes
-
Promo / offline code redemption (
engage.codes). - EngageCore
-
What Engage needs from the core plugin: the feature switches, the request
context and the error report-back. The default (ClikgateCoreBridge) is
Clikgate's internal API; tests pass a fake. - EngageLeaderboards
-
Leaderboards published to the SDK (
engage.leaderboards). - EngageReferrals
-
Referrer-side referral calls (
engage.referrals). -
Share helpers (
engage.share). No feature check. - LeaderboardEntry
- One ranked referrer. display follows the board's name mode (masked, display name or code).
- LeaderboardPage
-
A page of leaderboard entries (
toporaroundMe). name, metric and segment are null foraroundMe. - LeaderboardPeriod
-
Which leaderboard period to read: current (default), previous or a
period by key (LeaderboardPeriod.key, e.g.
2026-W43). - LeaderboardPeriodInfo
- A leaderboard period as returned by the API.
- MyRank
-
The current user's standing on a leaderboard (
leaderboards.me). - RedeemedCode
- The code a Redemption matched.
- Redemption
-
Result of
codes.redeem. - ReferralLink
-
The current user's referral link and code in a program
(
referrals.createLink). - ReferralStats
-
The current user's referrer stats in a program (
referrals.myStats).
Enums
-
The app a link was shared to (
share.link'sapp, and what Clikgate records for each share). ShareApp.other is any app Clikgate can't name.
Typedefs
-
Hands a
share.linkcall to the native SDK's Engage features; true when the app itself opened. -
Presents the system share sheet with
text. -
EngageUrlOpener
= Future<
bool> Function(Uri uri) -
Opens
uriin another app; true when it was opened.