23 lines
460 B
Dart
23 lines
460 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
|
|
operator ==(Object other) {
|
|
final i = other as IngredientListEntry;
|
|
return ingredient == i.ingredient;
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(ingredient, null);
|
|
}
|
|
}
|