Npc class

A class that represents the npc entity

Constructors

Npc({required String name, required int age, required Gender gender, required Race race, required String occupation, required PhysicalDescription physicalDescription, required Personality personality, required String goal, required List<Companion> companions})
const
Npc.fromJson(String source)
factory
Npc.fromMap(Map<String, dynamic> map)
factory
Npc.fromShallowMap(Map<String, dynamic> map)
factory

Properties

age int
The age of the npc
final
companions List<Companion>
A list of the companions the npc has
final
gender Gender
The gender of the npc
final
goal String
The goal of the npc
final
hashCode int
The hash code for this object.
no setteroverride
name String
The name of the npc
final
occupation String
The occupation of the npc
final
personality Personality
The personality of the npc
final
physicalDescription PhysicalDescription
The physical description of the npc
final
race Race
The race of the npc
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? name, int? age, Gender? gender, Race? race, String? occupation, PhysicalDescription? physicalDescription, Personality? personality, String? goal, List<Companion>? companions}) Npc
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 Npc other) bool
The equality operator.
override