Item class

Wrapper object for an item. These can be retrieved from a number of queries and operations, and are considered either 'complete' or 'partial.' Certain data is not available from partial items, and if those fields are needed, you have to call Item.get() with the ID from the partial item.

Constructors

Item(Item? _native, ItemRecord? _nativeRecord, bool _complete)
Item.fromItem(Item n)
Item.fromRecord(ItemRecord n)

Properties

hashCode int
The hash code for this object.
no setterinherited
partial bool
Is this a partial item?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getCookbookId() String
Retrieves the ID of the item's associated cookbook.
getCreatedAt() → Int64
Retrieves the block height as of this item's creation.
getDouble(String key) double?
Retrieves the double parameter with the provided key for this item, or null if no such parameter exists.
getId() String
Retrieves the item's ID.
getInt(String key) → Int64?
Retrieves the Int64 parameter with the provided key for this item, or null if no such parameter exists.
getLastUpdate() → Int64
Retrieves the block height as of this item's last update.
getNodeVersion() → Int64
Retrieves the node version of this item. Since all items are retrieved from the chain, this should generally just be the current version; don't worry about it.
getOwner() String
Retrieves the address of the item's owner.
getRecipeId() String
Retrieves the ID of the recipe the item was generated by.
getString(String key) String?
Retrieves the string parameter with the provided key for this item, or null if no such parameter exists.
getTradePercentage() double
To be documented; not generally significant to client applications.
getUpdatedAt() → Int64
TODO: what even is the difference between this and lastUpdate
isTradeable() bool
Can the item be transferred to other users?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

get(String id, {String? cookbook}) Future<Item>
Retrieves the item with the provided ID from the chain. If cookbook is specified manually, you can override the loaded cookbook or query an item before loading a cookbook; otherwise, the item will be retrieved for the loaded cookbook.