presentation/widgets/common/inventory_grid library

Classes

InventoryGrid
A data-driven grid over an InventorySnapshot — like QuestViewModel/ LeaderboardEntry, this widget holds no game logic or catalog of its own; itemBuilder is the caller's own renderer (item icon, rarity frame, stack count, equipped badge — this package doesn't ship a concrete item catalog, see ItemDefinition's doc), and a tap never mutates anything here — the caller's own tap handler is expected to call InventoryService.consume/setEquipped/moveSlot itself.

Typedefs

InventoryItemBuilder = Widget Function(BuildContext context, InventorySlot slot, bool isSelected)
Renders one filled cell — isSelected reflects InventoryGrid.selectedSlotId so the caller decides how to highlight it (this widget holds no selection state of its own, see class doc).
InventoryPlaceholderBuilder = Widget Function(BuildContext context, int cellIndex)
Renders one non-item cell (empty or locked) at cellIndex (0-based, stable across rebuilds as long as InventoryGrid.unlockedCapacity doesn't change).