ItemSchema class

Constructors

ItemSchema({required String name, required String code, required int level, required String type, required String subtype, required String description, List<ConditionSchema> conditions = const [], List<SimpleEffectSchema> effects = const [], CraftSchema? craft, required bool tradeable})
Returns a new ItemSchema instance.

Properties

code String
Item code. This is the item's unique identifier (ID).
getter/setter pair
conditions List<ConditionSchema>
Item conditions. If applicable. Conditions for using or equipping the item.
getter/setter pair
craft CraftSchema?
Craft information. If applicable.
getter/setter pair
description String
Item description.
getter/setter pair
effects List<SimpleEffectSchema>
List of object effects. For equipment, it will include item stats.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
level int
Item level.
getter/setter pair
name String
Item name.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subtype String
Item subtype.
getter/setter pair
tradeable bool
Item tradeable status. A non-tradeable item cannot be exchanged or sold.
getter/setter pair
type String
Item type.
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) ItemSchema?
Returns a new ItemSchema instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<ItemSchema>
mapFromJson(dynamic json) Map<String, ItemSchema>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<ItemSchema>>

Constants

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