ResourceSchema class

Constructors

ResourceSchema({required String name, required String code, required GatheringSkill skill, required int level, List<DropRateSchema> drops = const []})
Returns a new ResourceSchema instance.

Properties

code String
The code of the resource. This is the resource's unique identifier (ID).
getter/setter pair
drops List<DropRateSchema>
The drops of this resource.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
level int
The skill level required to gather this resource.
getter/setter pair
name String
The name of the resource
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skill GatheringSkill
The skill required to gather this resource.
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) ResourceSchema?
Returns a new ResourceSchema instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<ResourceSchema>
mapFromJson(dynamic json) Map<String, ResourceSchema>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<ResourceSchema>>

Constants

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