Deity.fromMap constructor
Implementation
factory Deity.fromMap(Map<String, dynamic> map) {
return Deity(
name: map['name'],
gender:
map['gender'] != null ? Gender.values.byName(map['gender']) : null,
deityType: DeityManager().getType(map['deityType']),
domains: List<String>.from((map['domains'])),
alignment:
map['alignment'] != null ? Alignment.fromMap(map['alignment']) : null,
depiction: map['depiction'],
worshipedBy: map['worshipedBy'] != null
? RaceManager().getType(map['worshipedBy'])
: null,
worshipers: map['worshipers'],
shrinesRarity: map['shrinesRarity'],
positiveAttribute: map['positiveAttribute'],
negativeAttribute: map['negativeAttribute'],
);
}