CharacterClass.fromJson constructor
CharacterClass.fromJson(
- Map<String, dynamic> json
)
Implementation
factory CharacterClass.fromJson(Map<String, dynamic> json) => CharacterClass(
meta: json['_meta'],
name: json["name"],
key: json["key"],
description: json["description"],
damageDice: Dice.fromJson(json["damageDice"]),
load: json["load"],
hp: json["hp"],
alignments: AlignmentValues.fromJson(json["alignments"]),
bonds: List<String>.from(json["bonds"]),
flags: List<String>.from(json["flags"]),
gearChoices: List<GearChoice>.from(
json["gearChoices"].map((x) => GearChoice.fromJson(x)),
),
isSpellcaster: json["isSpellcaster"] ?? false,
);