Files
recipe_journal/lib/models/ingredient_list_entry.dart

27 lines
591 B
Dart

import 'ingredient.dart';
import 'unit.dart';
class IngredientListEntry {
final Ingredient ingredient;
final int amount;
final Unit unit;
final bool optional;
IngredientListEntry({
required this.ingredient,
required this.amount,
required this.unit,
this.optional = false,
});
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is IngredientListEntry &&
ingredient == other.ingredient &&
amount == other.amount;
@override
int get hashCode => Object.hash(ingredient.hashCode, amount.hashCode);
}