Functioning Ingredient BottomSheet
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user