GameOpenRequest class final

The plain input routing calls open a game with: the cached skin file, the chance and skin identity the bridge answers with, and the exactly-once close/failure callbacks. The game is always full screen. Port of iOS GameOpenRequest in GameModels.swift.

Constructors

GameOpenRequest({required String campaignKey, required String campaignId, required String skinId, required int skinVersion, required String chanceId, required String? testInvocationId, required String projectId, required String userId, required String entryHtml, required bool showMute, required bool showClose, required CEPTriggerPayload payload, required String entry, String? themeFontFamily, String themeFontsJson = '[]', String valuesJson = '{}', String slotsJson = '[]', void onClose(String reason)?, void onFailure(GameFailureReason reason)?, void onCta(String reason)?, void onShown()?, void onHttpAnswer(String path, Map<String, dynamic>? requestBody, Map<String, dynamic>? responseBody)?, void onHttpTimeout(String reason)?, void onForeground(bool foreground)?})

Properties

campaignId → String
final
campaignKey → String
final
chanceId → String
final
entry → String
direct, inlineTeaser, floating or rewards. Carried for the game_ health events and every funnel event.
final
entryHtml → String
The cached index.html, already decoded. The web view never needs the network to load: download-then-show resolves this before the request is built.
final
hashCode → int
The hash code for this object.
no setterinherited
onClose → void Function(String reason)?
Fires on close with why: user/back for the close button and back, screen_exit for an OS kill, skin for the skin's own close, cta for a handoff op, cancelled for a coordination cancel, superseded for a live-test replace, http_timeout for a shown hang, failure for a post-show failure. A close before the first ready never fires this: it fails as closed_before_ready (or the pre-show reason) instead.
final
onCta → void Function(String reason)?
Fires once the skin's CTA op has run, with the op as the skin sent it (copy, openLink, share, or a passthrough op like requestReview). The caller reports the click. A skin close never fires this.
final
onFailure → void Function(GameFailureReason reason)?
final
onForeground → void Function(bool foreground)?
Fires when the app enters (true) or leaves (false) the foreground while the game is open, for the window's dwell time.
final
onHttpAnswer → void Function(String path, Map<String, dynamic>? requestBody, Map<String, dynamic>? responseBody)?
Fires after each answered skin http call with the validated path, the sent body and the answered body, for the window's play stats.
final
onHttpTimeout → void Function(String reason)?
Fires when a skin http call times out, with the validated path. A shown game settles http_timeout; a loading one fails to open.
final
onShown → void Function()?
Fires once when the skin sends ready and the game becomes visible.
final
payload → CEPTriggerPayload
The payload this delivery was routed with, for the game's analytics events.
final
projectId → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showClose → bool
final
showMute → bool
final
skinId → String
final
skinVersion → int
final
slotsJson → String
init.slots: outcome-keyed slot values, read whenever present.
final
testInvocationId → String?
Live-test invocation this game was opened for; the skin's state call carries it so a draft campaign answers instead of refusing notFound. Null for organic opens.
final
themeFontFamily → String?
The campaign theme family, when the host sets none.
final
themeFontsJson → String
init.theme.fonts JSON; [] when the campaign sets none.
final
userId → String
final
valuesJson → String
init.values: the marketer's field values, carried opaquely.
final

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