GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeWidgetItemCustomMapping - iOS

BlazeWidgetItemCustomMapping is a structure designed to facilitate custom key-value mappings for Blaze widget items. It enables the association of specific data points with a widget item, allowing for flexible data representation within the widget.

key

let key: String

The key for the custom mapping, represented as a String. This key identifies the type of data or attribute the value corresponds to.

value

let value: String

The value for the custom mapping, represented as a String. This value contains the specific data or attribute associated with the key.

Enums

KeysPresets

An enumeration defining preset keys for commonly used attributes in Blaze widget items. This facilitates easier and more consistent key management across different implementations of the widget.

ValueRawValueDescription
gameId"gameId"Represents a game identifier.
teamId"teamId"Represents a team identifier.
playerId"playerId"Represents a player identifier.

Initialization

Initializes a new instance of BlazeWidgetItemCustomMapping with explicit key and value strings.

Parameters:

  • key: A String representing the key for the mapping.
  • value: A String representing the value associated with the key.
init(key: String, value: String) {
  self.key = key
  self.value = value
}

Initializes a new instance of BlazeWidgetItemCustomMapping using a predefined key preset and a custom value string.

Parameters:

  • keyPreset: A KeysPresets enum value representing a predefined key.
  • value: A String representing the value associated with the predefined key.
init(keyPreset: KeysPresets, value: String) {
   self.key = keyPreset.rawValue
   self.value = value
}

Did this page help you?