added expandable list of ingredients
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import 'unit.dart';
|
||||
|
||||
class Ingredient {
|
||||
final String title;
|
||||
List<String> possibleUnits = [];
|
||||
List<Unit> possibleUnits = [];
|
||||
List<String> preferredBrands = [];
|
||||
|
||||
Ingredient({
|
||||
|
||||
17
lib/models/unit.dart
Normal file
17
lib/models/unit.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
class Unit {
|
||||
final String name;
|
||||
final UnitType type;
|
||||
final System system;
|
||||
|
||||
Unit(this.name, this.type, {this.system = System.metric});
|
||||
}
|
||||
|
||||
enum System { metric, imperial, neutral }
|
||||
|
||||
enum UnitType {
|
||||
metric,
|
||||
imperial,
|
||||
fluid,
|
||||
weight,
|
||||
count,
|
||||
}
|
||||
Reference in New Issue
Block a user