Campaign funnel + health mapping for gamification. Pure: every function
builds the event the caller emits through EngageEventEmitter.toDigia,
so unit tests pin the mapping without a surface. Port of iOS GameEvent,
GameHealthEvents and GameOpenFailedEvent wiring.
- Viewed once per WebView display.
- Clicked on an entry tap or a skin CTA op (
openLink,openUrl,deeplink,customKV,share,copy). - Dismissed with the close reason (
user,back,screen_exit,cancelled,skin,cta,failure,superseded,web_process_terminated,http_timeout). - Health:
game_open_failed,game_http_failed,game_rewards_failed,game_grant_failed,game_skin_prefetch_failed,game_skin_error(at most 5 per open),game_bridge_dropped.
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
clicked(
{required String elementId, required String chanceId, String entry = ''}) → GameClickedEvent - Builds the Clicked event for an entry tap or skin CTA op.
-
dismissed(
{required String reason, required int dwellMs, required String chanceId, required String skinId, required int skinVersion, required int plays, required String playRefused, String entry = ''}) → GameDismissedEvent - Builds the Dismissed event for a closed game.
-
grantFailed(
{required GameHealthContext health, required GameOutcomeFailure failure, int? status, int durationMs = 0, bool timedOut = false}) → GameGrantFailedEvent -
Builds the grant-failed health event for a
grantChancefailure. A timeout staystimeout, nevernetwork. -
isGrantFailedReason(
String reason) → bool -
A failed
grantChancecall reportsgame_grant_failed, nevergame_open_failed: it offered nothing to open. Only these three fail reasons are grant failures. Port of Android'srequestPlayDecisionsplit. -
openFailed(
{required String reason, required String chanceId, required String entry, required String skinId, required int skinVersion, String stage = ''}) → GameOpenFailedEvent - Builds the open-failed health event for one failed open, tagged with the furthest stage the open reached.
-
openFailedAtTiming(
{required String reason, required String chanceId, required String entry, required String skinId, required int skinVersion, GameOpenTiming? timing}) → GameOpenFailedEvent - Builds the open-failed health event from a live GameOpenTiming.
-
openFailedReasonFor(
PlayDecision decision) → String? -
Maps a non-open PlayDecision to its
game_open_failedreason. Null when the decision opens or renders (no failure to report), and null for every expected drop: denied, not-shown and busy are recorded on the delivery outcome, never as health. Only client failures qualify. -
openFailedReasonForFailure(
GameFailureReason reason) → String -
Maps a GameFailureReason to its
game_open_failedwire value. -
rewardsFailed(
{required GameHealthContext health, required String op, required GameOutcomeFailure failure, int? status, int durationMs = 0, bool timedOut = false}) → GameRewardsFailedEvent -
Builds the rewards-failed health event.
opisrewardsfor the page/widget fetch,statefor the after-close entry check, or the bridgehttppath that failed. A timeout staystimeout. -
skinPrefetchFailed(
{required GameHealthContext health, required String code}) → GameSkinPrefetchFailedEvent - Builds the skin-prefetch-failed health event.
-
viewed(
{required String chanceId, required String skinId, required int skinVersion, String entry = '', bool warm = false, String tier = '', int msToReady = -1}) → GameViewedEvent -
Builds the Viewed event for one showing: once per open, on the first
ready. Carries where the game opened from, whether the skin served from the cache, the device tier, and the trigger-to-ready time.