Functioning Ingredient BottomSheet

This commit is contained in:
2025-02-11 21:52:22 +01:00
parent 2b8e1dc2cb
commit 40429832ab
4 changed files with 315 additions and 3 deletions

View File

@@ -155,4 +155,37 @@ abstract class CookingUnits {
};
return abbreviations[unit.name] ?? '';
}
static List<Unit> get values => [
teaspoon,
tablespoon,
fluidOunce,
cup,
pint,
quart,
gallon,
milliliter,
liter,
ounce,
pound,
gram,
kilogram,
piece,
dozen,
pinch,
dash,
drop,
stick,
can,
batch,
handful,
];
static List<Unit> getByType(UnitType type) {
return values.where((unit) => unit.type == type).toList();
}
static List<Unit> getBySystem(System system) {
return values.where((unit) => unit.system == system).toList();
}
}