inventory library
The component checklist a look answers, row by row (a live specimen, or the reason it leaves the row out), and the gallery that lists a look's answers. A look's own tests and gallery import it; an app does not need it.
Outside semver: this library may change in any version, a patch included; the CHANGELOG says how to move.
Classes
- DesignInventory
- A look's inventory: one entry per DesignInventoryRow.
- DesignInventoryEntry
- A look's answer to one row: a live specimen (builder) or the reason the look leaves it out (absentReason).
- DesignInventoryGallery
-
Lists an inventory, group by group in DesignInventoryRow.groups' order: each row's
live specimen, or
Deliberately absent: <reason>for a gap, or "Missing" for a row the inventory does not answer. Lazy: a row builds when it scrolls in. - DesignInventoryRow
- One row of the inventory: a component every look either carries or leaves out with a reason.
Typedefs
- DesignInventoryGroupBuilder = Widget Function(BuildContext context, String group, int present, int total)
-
Builds a group's heading in a DesignInventoryGallery:
presentoftotalrows carried. - DesignInventoryRowBuilder = Widget Function(BuildContext context, DesignInventoryRow row, DesignInventoryEntry? entry, Widget? specimen)
-
Builds one row in a DesignInventoryGallery.
entryis null when the inventory does not answer the row;specimenis the entry's live specimen, built, when it has one.
Exceptions / Errors
- DesignInventoryError
- Thrown by DesignInventory.verify: the rows an inventory answers wrong.