Settlement class
A class that represent a settlement
Constructors
-
Settlement({required String name, required SettlementType settlementType, Race? dominantRace, required List<
Location> locations, required String description, String? dominantOccupation, required List<Npc> importantCharacters, required int population, required String trouble}) -
const
- Settlement.fromJson(String source)
-
factory
-
Settlement.fromMap(Map<
String, dynamic> map) -
factory
-
Settlement.fromShallowMap(Map<
String, dynamic> map) -
factory
Properties
- description → String
-
A description of the settlement
final
- dominantOccupation → String?
-
The dominant occupation of the citizens (if there is)
final
- dominantRace → Race?
-
The dominant race in the settlement (null if there is no dominant race)
final
- hashCode → int
-
The hash code for this object.
no setteroverride
-
importantCharacters
→ List<
Npc> -
Important characters in the settlements
final
-
locations
→ List<
Location> -
Important locations in the settlement
final
- name → String
-
The name of the settlement
final
- population → int
-
The population of the settlement
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settlementType → SettlementType
-
The type of the settlement
final
- trouble → String
-
A trouble this settlement is facing
final
Methods
-
copyWith(
{String? name, SettlementType? settlementType, Race? dominantRace, List< Location> ? locations, String? description, String? dominantOccupation, List<Npc> ? importantCharacters, int? population, String? trouble}) → Settlement -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String -
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
covariant Settlement other) → bool -
The equality operator.
override