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: StringThe 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: StringThe 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.
| Value | RawValue | Description |
|---|---|---|
| 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
Stringrepresenting the key for the mapping. - value: A
Stringrepresenting 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
KeysPresetsenum value representing a predefined key. - value: A
Stringrepresenting the value associated with the predefined key.
init(keyPreset: KeysPresets, value: String) {
self.key = keyPreset.rawValue
self.value = value
}Updated 11 days ago
