ChallengeResponse constructor
ChallengeResponse(
- dynamic res
Implementation
ChallengeResponse(dynamic res) {
if (res == null) {
return;
}
result = res["result"] as bool;
season = res["season"] as int;
lang = res["lang"] as String;
for (dynamic bundle in res["bundles"]) {
bundles.add(
ChallengeBundle(
id: bundle["id"],
name: bundle["name"],
unlockType: bundle["unlockType"],
tags: bundle["tags"],
apiTags: bundle["apiTags"],
colors: bundle["colors"],
images: bundle["images"],
bundleRewards: bundle["bundleRewards"],
),
);
}
}