Challenge.fromJson constructor
Challenge.fromJson(
- dynamic json
Implementation
factory Challenge.fromJson(dynamic json) {
final challengeJsonMap = json as Map<String, dynamic>;
return Challenge(
id: challengeJsonMap["id"] as String,
salts: (challengeJsonMap["salts"] as List<dynamic>).map((x) => x as String).toList(),
difficultyFactor: challengeJsonMap["difficultyFactor"] as int
);
}