getItem method

int? getItem({
  1. required Item item,
})

Returns the quantity of a certain Item that the user holds in their inventory.

Implementation

int? getItem({required Item item}) {
  return items[item];
}