import '../src/enums.dart' show IngredientType; import 'unit.dart'; class Ingredient { final String title; final List possibleUnits; final List 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); }