FightSchema class

Constructors

FightSchema({required int xp, required int gold, List<DropSchema> drops = const [], required int turns, required BlockedHitsSchema monsterBlockedHits, required BlockedHitsSchema playerBlockedHits, List<String> logs = const [], required FightResult result})
Returns a new FightSchema instance.

Properties

drops List<DropSchema>
The items dropped from the fight.
getter/setter pair
gold int
The amount of gold gained from the fight.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
logs List<String>
The fight logs.
getter/setter pair
monsterBlockedHits BlockedHitsSchema
The amount of blocked hits by the monster.
getter/setter pair
playerBlockedHits BlockedHitsSchema
The amount of blocked hits by the player.
getter/setter pair
result FightResult
The result of the fight.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
turns int
Numbers of the turns of the combat.
getter/setter pair
xp int
The amount of xp gained from the fight.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromJson(dynamic value) FightSchema?
Returns a new FightSchema instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<FightSchema>
mapFromJson(dynamic json) Map<String, FightSchema>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<FightSchema>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.