Implementation
Item(dynamic item) {
if (item["interest"] is int) {
item["interest"] = item["interest"].toDouble();
}
id = item["id"] as String;
type = item["type"];
name = item["name"] as String;
description = item["description"] as String;
rarity = item["rarity"];
series = item["series"];
price = item["price"] as int;
added = item["added"];
builtInEmote = item["builtInEmote"];
copyrightedAudio = item["copyrightedAudio"] as bool;
upcoming = item["upcoming"] as bool;
reactive = item["reactive"] as bool;
releaseDate = item["releaseDate"];
lastAppearance = item["lastAppearance"];
interest = item["interest"];
icon = item["images"]["icon"] ?? "";
featured = item["images"]["featured"] ?? "";
bg = item["images"]["background"] ?? "";
fullBg = item["images"]["full_background"] ?? "";
video = item["video"] ?? "";
audio = item["audio"] ?? "";
gameplayTags = item["gameplayTags"] ?? [];
apiTags = item["apiTags"] ?? [];
battlepass = item["battlepass"];
itemSet = item["set"];
if (item["shopHistory"] != null && item["shopHistory"] is List) {
shopHistory = item["shopHistory"];
} else {
shopHistory = [];
}
displayAssets = item["displayAssets"];
styles = item["styles"];
}