Files
recipe_journal/lib/models/ingredient.dart

25 lines
571 B
Dart

import '../src/enums.dart' show IngredientType;
import 'unit.dart';
class Ingredient {
final String title;
final List<Unit> possibleUnits;
final List<String> preferredBrands;
final IngredientType type;
Ingredient({
required this.title,
required this.type,
this.possibleUnits = const [],
this.preferredBrands = const [],
});
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is Ingredient && other.title == title && other.type == type;
@override
int get hashCode => Object.hash(title, type);
}