InventorySlot class

One stack inside an inventory. slotId is a stable identity assigned once at creation — it's what InventoryService.setEquipped/moveSlot target, so it survives a grant/consume elsewhere in the inventory changing the list's indices.

Constructors

InventorySlot({required int slotId, required String itemId, required int quantity, bool equipped = false})
const

Properties

equipped → bool
final
hashCode → int
The hash code for this object.
no setterinherited
itemId → String
final
quantity → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
slotId → int
final

Methods

copyWith({int? quantity, bool? equipped}) → InventorySlot
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