toMap method
Implementation
Map<String, dynamic> toMap() {
return <String, dynamic>{
'name': name,
'settlementType': settlementType.getSettlementType(),
'dominantRace': dominantRace?.getName(),
'locations': locations.map((x) => x.toMap()).toList(),
'description': description,
'dominantOccupation': dominantOccupation,
'importantCharacters': importantCharacters.map((x) => x.toMap()).toList(),
'population': population,
'trouble': trouble,
};
}