Files
recipe_journal/lib/models/ingredient_list_entry.dart

22 lines
533 B
Dart

import 'ingredient.dart';
import 'unit.dart';
class IngredientListEntry {
final Ingredient ingredient;
final int amount;
final Unit unit;
final bool optional;
IngredientListEntry(this.ingredient, this.amount, this.unit, this.optional);
@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);
}