toMap method
Implementation
Map<String, dynamic> toMap() {
return <String, dynamic>{
'name': name,
'kingdomType': kingdomType.getKingdomType(),
'rulers': rulers.map((x) => x.toMap()).toList(),
'race': race.getName(),
'population': population,
'capital': capital.toMap(),
'importantSettlements':
importantSettlements.map((x) => x.toMap()).toList(),
'governmentType': governmentType.getGovernmentType(),
'emblem': emblem.toMap(),
'knownFor': knownFor,
'history': history,
'guilds': guilds.map((x) => x.toMap()).toList(),
'trouble': trouble,
'holidays': holidays.map((x) => x.toMap()).toList()
};
}