Guild.fromMap constructor
Implementation
factory Guild.fromMap(Map<String, dynamic> map) {
return Guild(
name: map['name'],
leader: Npc.fromMap(map['leader']),
guildType: GuildManager().getType(map['guildType']),
reputation: map['reputation'],
history: map['history'],
emblem: Emblem.fromMap(map['emblem']),
motto: map['motto'],
specialties: List<String>.from((map['specialties'])),
quests: List<String>.from((map['quests'])),
notableMembers: List<Npc>.from(
(map['notableMembers']).map<Npc>(
(x) => Npc.fromMap(x),
),
),
);
}