GameInitPayload class final
The init message sent as window.DigiaBridge.__receive(str) after the
page loads and on every repeated ready. Carries everything the skin
feature-detects or renders with — bridge version, chance/campaign/slots,
viewport, theme and device facts — so no later SDK update is needed for a
new skin. Never carries secrets (no API key, user ID, grant ID, play ID or
deep link); the campaign key rides along so the skin can ask state by
key. Never throws.
Constructors
- GameInitPayload({required String chanceId, required String campaignId, required String campaignKey, required String skinId, required int skinVersion, String valuesJson = '{}', String? slotsJson, String surface = 'fullScreen', double viewportWidth = 0, double viewportHeight = 0, GameSafeArea safeArea = GameSafeArea.zero, double keyboardInsetBottom = 0, String colorScheme = 'light', String? fontFamily, String fontsJson = '[]', String deviceJson = '{}', String? chanceStateJson})
-
const
Properties
- campaignId → String
-
The server campaign id (
campaignUidon the wire) for the skin's own bookkeeping. The wire name is unchanged.final - campaignKey → String
-
Backend campaign key, so the skin can ask
stateby key.final - chanceId → String
-
final
- chanceStateJson → String?
-
The last successful
stateanswer for this chance (rawdata.responseJSON), sent aschanceStateso the skin can skip its open-timestatecall. Null omits it.final - colorScheme → String
-
final
- deviceJson → String
-
Device facts JSON string from
DeviceFacts.toJson().final - fontFamily → String?
-
final
- fontsJson → String
-
JSON array string of
{family, url}theme fonts;[]when none.final - hashCode → int
-
The hash code for this object.
no setterinherited
- keyboardInsetBottom → double
-
The keyboard height in CSS px,
0when hidden. The skin shifts its input above it; pushed with the viewport whenever it changes.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safeArea → GameSafeArea
-
final
- skinId → String
-
final
- skinVersion → int
-
final
- slotsJson → String?
-
JSON array string of slots;
[]when the campaign maps none.final - surface → String
-
final
- valuesJson → String
-
JSON object string of the marketer's field values.
final
- viewportHeight → double
-
final
- viewportWidth → double
-
final
Methods
-
copyWith(
{double? viewportWidth, double? viewportHeight, GameSafeArea? safeArea, double? keyboardInsetBottom, String? deviceJson, String? chanceStateJson}) → GameInitPayload -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited