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,floatingorrewards. Carried for thegame_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/backfor the close button and back,screen_exitfor an OS kill,skinfor the skin's ownclose,ctafor a handoff op,cancelledfor a coordination cancel,supersededfor a live-test replace,http_timeoutfor a shown hang,failurefor a post-show failure. A close before the firstreadynever fires this: it fails asclosed_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 likerequestReview). The caller reports the click. A skinclosenever 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
httpcall 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
httpcall times out, with the validated path. A shown game settleshttp_timeout; a loading one fails to open.final - onShown → void Function()?
-
Fires once when the skin sends
readyand 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
statecall carries it so a draft campaign answers instead of refusingnotFound. Null for organic opens.final - themeFontFamily → String?
-
The campaign theme family, when the host sets none.
final
- themeFontsJson → String
-
init.theme.fontsJSON;[]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