// GENERATED CODE - DO NOT MODIFY BY HAND part of 'example.dart'; // ************************************************************************** // MoorGenerator // ************************************************************************** // ignore_for_file: unnecessary_brace_in_string_interps, unnecessary_this class Category extends DataClass implements Insertable { final int id; final String description; Category({@required this.id, this.description}); factory Category.fromData(Map data, GeneratedDatabase db, {String prefix}) { final effectivePrefix = prefix ?? ''; final intType = db.typeSystem.forDartType(); final stringType = db.typeSystem.forDartType(); return Category( id: intType.mapFromDatabaseResponse(data['${effectivePrefix}id']), description: stringType .mapFromDatabaseResponse(data['${effectivePrefix}description']), ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (!nullToAbsent || id != null) { map['id'] = Variable(id); } if (!nullToAbsent || description != null) { map['description'] = Variable(description); } return map; } factory Category.fromJson(Map json, {ValueSerializer serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return Category( id: serializer.fromJson(json['id']), description: serializer.fromJson(json['description']), ); } factory Category.fromJsonString(String encodedJson, {ValueSerializer serializer}) => Category.fromJson( DataClass.parseJson(encodedJson) as Map, serializer: serializer); @override Map toJson({ValueSerializer serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'description': serializer.toJson(description), }; } Category copyWith({int id, String description}) => Category( id: id ?? this.id, description: description ?? this.description, ); @override String toString() { return (StringBuffer('Category(') ..write('id: $id, ') ..write('description: $description') ..write(')')) .toString(); } @override int get hashCode => $mrjf($mrjc(id.hashCode, description.hashCode)); @override bool operator ==(dynamic other) => identical(this, other) || (other is Category && other.id == this.id && other.description == this.description); } class CategoriesCompanion extends UpdateCompanion { final Value id; final Value description; const CategoriesCompanion({ this.id = const Value.absent(), this.description = const Value.absent(), }); CategoriesCompanion.insert({ this.id = const Value.absent(), this.description = const Value.absent(), }); static Insertable custom({ Expression id, Expression description, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (description != null) 'description': description, }); } CategoriesCompanion copyWith({Value id, Value description}) { return CategoriesCompanion( id: id ?? this.id, description: description ?? this.description, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (description.present) { map['description'] = Variable(description.value); } return map; } } class $CategoriesTable extends Categories with TableInfo<$CategoriesTable, Category> { final GeneratedDatabase _db; final String _alias; $CategoriesTable(this._db, [this._alias]); final VerificationMeta _idMeta = const VerificationMeta('id'); GeneratedIntColumn _id; @override GeneratedIntColumn get id => _id ??= _constructId(); GeneratedIntColumn _constructId() { return GeneratedIntColumn('id', $tableName, false, hasAutoIncrement: true, declaredAsPrimaryKey: true); } final VerificationMeta _descriptionMeta = const VerificationMeta('description'); GeneratedTextColumn _description; @override GeneratedTextColumn get description => _description ??= _constructDescription(); GeneratedTextColumn _constructDescription() { return GeneratedTextColumn( 'description', $tableName, true, ); } @override List get $columns => [id, description]; @override $CategoriesTable get asDslTable => this; @override String get $tableName => _alias ?? 'categories'; @override final String actualTableName = 'categories'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id'], _idMeta)); } if (data.containsKey('description')) { context.handle( _descriptionMeta, description.isAcceptableOrUnknown( data['description'], _descriptionMeta)); } return context; } @override Set get $primaryKey => {id}; @override Category map(Map data, {String tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; return Category.fromData(data, _db, prefix: effectivePrefix); } @override $CategoriesTable createAlias(String alias) { return $CategoriesTable(_db, alias); } } class Recipe extends DataClass implements Insertable { final int id; final String title; final String instructions; final int category; Recipe( {@required this.id, @required this.title, @required this.instructions, this.category}); factory Recipe.fromData(Map data, GeneratedDatabase db, {String prefix}) { final effectivePrefix = prefix ?? ''; final intType = db.typeSystem.forDartType(); final stringType = db.typeSystem.forDartType(); return Recipe( id: intType.mapFromDatabaseResponse(data['${effectivePrefix}id']), title: stringType.mapFromDatabaseResponse(data['${effectivePrefix}title']), instructions: stringType .mapFromDatabaseResponse(data['${effectivePrefix}instructions']), category: intType.mapFromDatabaseResponse(data['${effectivePrefix}category']), ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (!nullToAbsent || id != null) { map['id'] = Variable(id); } if (!nullToAbsent || title != null) { map['title'] = Variable(title); } if (!nullToAbsent || instructions != null) { map['instructions'] = Variable(instructions); } if (!nullToAbsent || category != null) { map['category'] = Variable(category); } return map; } factory Recipe.fromJson(Map json, {ValueSerializer serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return Recipe( id: serializer.fromJson(json['id']), title: serializer.fromJson(json['title']), instructions: serializer.fromJson(json['instructions']), category: serializer.fromJson(json['category']), ); } factory Recipe.fromJsonString(String encodedJson, {ValueSerializer serializer}) => Recipe.fromJson(DataClass.parseJson(encodedJson) as Map, serializer: serializer); @override Map toJson({ValueSerializer serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'title': serializer.toJson(title), 'instructions': serializer.toJson(instructions), 'category': serializer.toJson(category), }; } Recipe copyWith({int id, String title, String instructions, int category}) => Recipe( id: id ?? this.id, title: title ?? this.title, instructions: instructions ?? this.instructions, category: category ?? this.category, ); @override String toString() { return (StringBuffer('Recipe(') ..write('id: $id, ') ..write('title: $title, ') ..write('instructions: $instructions, ') ..write('category: $category') ..write(')')) .toString(); } @override int get hashCode => $mrjf($mrjc(id.hashCode, $mrjc(title.hashCode, $mrjc(instructions.hashCode, category.hashCode)))); @override bool operator ==(dynamic other) => identical(this, other) || (other is Recipe && other.id == this.id && other.title == this.title && other.instructions == this.instructions && other.category == this.category); } class RecipesCompanion extends UpdateCompanion { final Value id; final Value title; final Value instructions; final Value category; const RecipesCompanion({ this.id = const Value.absent(), this.title = const Value.absent(), this.instructions = const Value.absent(), this.category = const Value.absent(), }); RecipesCompanion.insert({ this.id = const Value.absent(), @required String title, @required String instructions, this.category = const Value.absent(), }) : title = Value(title), instructions = Value(instructions); static Insertable custom({ Expression id, Expression title, Expression instructions, Expression category, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (title != null) 'title': title, if (instructions != null) 'instructions': instructions, if (category != null) 'category': category, }); } RecipesCompanion copyWith( {Value id, Value title, Value instructions, Value category}) { return RecipesCompanion( id: id ?? this.id, title: title ?? this.title, instructions: instructions ?? this.instructions, category: category ?? this.category, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (title.present) { map['title'] = Variable(title.value); } if (instructions.present) { map['instructions'] = Variable(instructions.value); } if (category.present) { map['category'] = Variable(category.value); } return map; } } class $RecipesTable extends Recipes with TableInfo<$RecipesTable, Recipe> { final GeneratedDatabase _db; final String _alias; $RecipesTable(this._db, [this._alias]); final VerificationMeta _idMeta = const VerificationMeta('id'); GeneratedIntColumn _id; @override GeneratedIntColumn get id => _id ??= _constructId(); GeneratedIntColumn _constructId() { return GeneratedIntColumn('id', $tableName, false, hasAutoIncrement: true, declaredAsPrimaryKey: true); } final VerificationMeta _titleMeta = const VerificationMeta('title'); GeneratedTextColumn _title; @override GeneratedTextColumn get title => _title ??= _constructTitle(); GeneratedTextColumn _constructTitle() { return GeneratedTextColumn('title', $tableName, false, maxTextLength: 16); } final VerificationMeta _instructionsMeta = const VerificationMeta('instructions'); GeneratedTextColumn _instructions; @override GeneratedTextColumn get instructions => _instructions ??= _constructInstructions(); GeneratedTextColumn _constructInstructions() { return GeneratedTextColumn( 'instructions', $tableName, false, ); } final VerificationMeta _categoryMeta = const VerificationMeta('category'); GeneratedIntColumn _category; @override GeneratedIntColumn get category => _category ??= _constructCategory(); GeneratedIntColumn _constructCategory() { return GeneratedIntColumn( 'category', $tableName, true, ); } @override List get $columns => [id, title, instructions, category]; @override $RecipesTable get asDslTable => this; @override String get $tableName => _alias ?? 'recipes'; @override final String actualTableName = 'recipes'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id'], _idMeta)); } if (data.containsKey('title')) { context.handle( _titleMeta, title.isAcceptableOrUnknown(data['title'], _titleMeta)); } else if (isInserting) { context.missing(_titleMeta); } if (data.containsKey('instructions')) { context.handle( _instructionsMeta, instructions.isAcceptableOrUnknown( data['instructions'], _instructionsMeta)); } else if (isInserting) { context.missing(_instructionsMeta); } if (data.containsKey('category')) { context.handle(_categoryMeta, category.isAcceptableOrUnknown(data['category'], _categoryMeta)); } return context; } @override Set get $primaryKey => {id}; @override Recipe map(Map data, {String tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; return Recipe.fromData(data, _db, prefix: effectivePrefix); } @override $RecipesTable createAlias(String alias) { return $RecipesTable(_db, alias); } } class Ingredient extends DataClass implements Insertable { final int id; final String name; final int caloriesPer100g; Ingredient( {@required this.id, @required this.name, @required this.caloriesPer100g}); factory Ingredient.fromData(Map data, GeneratedDatabase db, {String prefix}) { final effectivePrefix = prefix ?? ''; final intType = db.typeSystem.forDartType(); final stringType = db.typeSystem.forDartType(); return Ingredient( id: intType.mapFromDatabaseResponse(data['${effectivePrefix}id']), name: stringType.mapFromDatabaseResponse(data['${effectivePrefix}name']), caloriesPer100g: intType.mapFromDatabaseResponse(data['${effectivePrefix}calories']), ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (!nullToAbsent || id != null) { map['id'] = Variable(id); } if (!nullToAbsent || name != null) { map['name'] = Variable(name); } if (!nullToAbsent || caloriesPer100g != null) { map['calories'] = Variable(caloriesPer100g); } return map; } factory Ingredient.fromJson(Map json, {ValueSerializer serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return Ingredient( id: serializer.fromJson(json['id']), name: serializer.fromJson(json['name']), caloriesPer100g: serializer.fromJson(json['caloriesPer100g']), ); } factory Ingredient.fromJsonString(String encodedJson, {ValueSerializer serializer}) => Ingredient.fromJson( DataClass.parseJson(encodedJson) as Map, serializer: serializer); @override Map toJson({ValueSerializer serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'name': serializer.toJson(name), 'caloriesPer100g': serializer.toJson(caloriesPer100g), }; } Ingredient copyWith({int id, String name, int caloriesPer100g}) => Ingredient( id: id ?? this.id, name: name ?? this.name, caloriesPer100g: caloriesPer100g ?? this.caloriesPer100g, ); @override String toString() { return (StringBuffer('Ingredient(') ..write('id: $id, ') ..write('name: $name, ') ..write('caloriesPer100g: $caloriesPer100g') ..write(')')) .toString(); } @override int get hashCode => $mrjf($mrjc(id.hashCode, $mrjc(name.hashCode, caloriesPer100g.hashCode))); @override bool operator ==(dynamic other) => identical(this, other) || (other is Ingredient && other.id == this.id && other.name == this.name && other.caloriesPer100g == this.caloriesPer100g); } class IngredientsCompanion extends UpdateCompanion { final Value id; final Value name; final Value caloriesPer100g; const IngredientsCompanion({ this.id = const Value.absent(), this.name = const Value.absent(), this.caloriesPer100g = const Value.absent(), }); IngredientsCompanion.insert({ this.id = const Value.absent(), @required String name, @required int caloriesPer100g, }) : name = Value(name), caloriesPer100g = Value(caloriesPer100g); static Insertable custom({ Expression id, Expression name, Expression caloriesPer100g, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (name != null) 'name': name, if (caloriesPer100g != null) 'calories': caloriesPer100g, }); } IngredientsCompanion copyWith( {Value id, Value name, Value caloriesPer100g}) { return IngredientsCompanion( id: id ?? this.id, name: name ?? this.name, caloriesPer100g: caloriesPer100g ?? this.caloriesPer100g, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (name.present) { map['name'] = Variable(name.value); } if (caloriesPer100g.present) { map['calories'] = Variable(caloriesPer100g.value); } return map; } } class $IngredientsTable extends Ingredients with TableInfo<$IngredientsTable, Ingredient> { final GeneratedDatabase _db; final String _alias; $IngredientsTable(this._db, [this._alias]); final VerificationMeta _idMeta = const VerificationMeta('id'); GeneratedIntColumn _id; @override GeneratedIntColumn get id => _id ??= _constructId(); GeneratedIntColumn _constructId() { return GeneratedIntColumn('id', $tableName, false, hasAutoIncrement: true, declaredAsPrimaryKey: true); } final VerificationMeta _nameMeta = const VerificationMeta('name'); GeneratedTextColumn _name; @override GeneratedTextColumn get name => _name ??= _constructName(); GeneratedTextColumn _constructName() { return GeneratedTextColumn( 'name', $tableName, false, ); } final VerificationMeta _caloriesPer100gMeta = const VerificationMeta('caloriesPer100g'); GeneratedIntColumn _caloriesPer100g; @override GeneratedIntColumn get caloriesPer100g => _caloriesPer100g ??= _constructCaloriesPer100g(); GeneratedIntColumn _constructCaloriesPer100g() { return GeneratedIntColumn( 'calories', $tableName, false, ); } @override List get $columns => [id, name, caloriesPer100g]; @override $IngredientsTable get asDslTable => this; @override String get $tableName => _alias ?? 'ingredients'; @override final String actualTableName = 'ingredients'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id'], _idMeta)); } if (data.containsKey('name')) { context.handle( _nameMeta, name.isAcceptableOrUnknown(data['name'], _nameMeta)); } else if (isInserting) { context.missing(_nameMeta); } if (data.containsKey('calories')) { context.handle( _caloriesPer100gMeta, caloriesPer100g.isAcceptableOrUnknown( data['calories'], _caloriesPer100gMeta)); } else if (isInserting) { context.missing(_caloriesPer100gMeta); } return context; } @override Set get $primaryKey => {id}; @override Ingredient map(Map data, {String tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; return Ingredient.fromData(data, _db, prefix: effectivePrefix); } @override $IngredientsTable createAlias(String alias) { return $IngredientsTable(_db, alias); } } class IngredientInRecipe extends DataClass implements Insertable { final int recipe; final int ingredient; final int amountInGrams; IngredientInRecipe( {@required this.recipe, @required this.ingredient, @required this.amountInGrams}); factory IngredientInRecipe.fromData( Map data, GeneratedDatabase db, {String prefix}) { final effectivePrefix = prefix ?? ''; final intType = db.typeSystem.forDartType(); return IngredientInRecipe( recipe: intType.mapFromDatabaseResponse(data['${effectivePrefix}recipe']), ingredient: intType.mapFromDatabaseResponse(data['${effectivePrefix}ingredient']), amountInGrams: intType.mapFromDatabaseResponse(data['${effectivePrefix}amount']), ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (!nullToAbsent || recipe != null) { map['recipe'] = Variable(recipe); } if (!nullToAbsent || ingredient != null) { map['ingredient'] = Variable(ingredient); } if (!nullToAbsent || amountInGrams != null) { map['amount'] = Variable(amountInGrams); } return map; } factory IngredientInRecipe.fromJson(Map json, {ValueSerializer serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return IngredientInRecipe( recipe: serializer.fromJson(json['recipe']), ingredient: serializer.fromJson(json['ingredient']), amountInGrams: serializer.fromJson(json['amountInGrams']), ); } factory IngredientInRecipe.fromJsonString(String encodedJson, {ValueSerializer serializer}) => IngredientInRecipe.fromJson( DataClass.parseJson(encodedJson) as Map, serializer: serializer); @override Map toJson({ValueSerializer serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return { 'recipe': serializer.toJson(recipe), 'ingredient': serializer.toJson(ingredient), 'amountInGrams': serializer.toJson(amountInGrams), }; } IngredientInRecipe copyWith( {int recipe, int ingredient, int amountInGrams}) => IngredientInRecipe( recipe: recipe ?? this.recipe, ingredient: ingredient ?? this.ingredient, amountInGrams: amountInGrams ?? this.amountInGrams, ); @override String toString() { return (StringBuffer('IngredientInRecipe(') ..write('recipe: $recipe, ') ..write('ingredient: $ingredient, ') ..write('amountInGrams: $amountInGrams') ..write(')')) .toString(); } @override int get hashCode => $mrjf($mrjc( recipe.hashCode, $mrjc(ingredient.hashCode, amountInGrams.hashCode))); @override bool operator ==(dynamic other) => identical(this, other) || (other is IngredientInRecipe && other.recipe == this.recipe && other.ingredient == this.ingredient && other.amountInGrams == this.amountInGrams); } class IngredientInRecipesCompanion extends UpdateCompanion { final Value recipe; final Value ingredient; final Value amountInGrams; const IngredientInRecipesCompanion({ this.recipe = const Value.absent(), this.ingredient = const Value.absent(), this.amountInGrams = const Value.absent(), }); IngredientInRecipesCompanion.insert({ @required int recipe, @required int ingredient, @required int amountInGrams, }) : recipe = Value(recipe), ingredient = Value(ingredient), amountInGrams = Value(amountInGrams); static Insertable custom({ Expression recipe, Expression ingredient, Expression amountInGrams, }) { return RawValuesInsertable({ if (recipe != null) 'recipe': recipe, if (ingredient != null) 'ingredient': ingredient, if (amountInGrams != null) 'amount': amountInGrams, }); } IngredientInRecipesCompanion copyWith( {Value recipe, Value ingredient, Value amountInGrams}) { return IngredientInRecipesCompanion( recipe: recipe ?? this.recipe, ingredient: ingredient ?? this.ingredient, amountInGrams: amountInGrams ?? this.amountInGrams, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (recipe.present) { map['recipe'] = Variable(recipe.value); } if (ingredient.present) { map['ingredient'] = Variable(ingredient.value); } if (amountInGrams.present) { map['amount'] = Variable(amountInGrams.value); } return map; } } class $IngredientInRecipesTable extends IngredientInRecipes with TableInfo<$IngredientInRecipesTable, IngredientInRecipe> { final GeneratedDatabase _db; final String _alias; $IngredientInRecipesTable(this._db, [this._alias]); final VerificationMeta _recipeMeta = const VerificationMeta('recipe'); GeneratedIntColumn _recipe; @override GeneratedIntColumn get recipe => _recipe ??= _constructRecipe(); GeneratedIntColumn _constructRecipe() { return GeneratedIntColumn( 'recipe', $tableName, false, ); } final VerificationMeta _ingredientMeta = const VerificationMeta('ingredient'); GeneratedIntColumn _ingredient; @override GeneratedIntColumn get ingredient => _ingredient ??= _constructIngredient(); GeneratedIntColumn _constructIngredient() { return GeneratedIntColumn( 'ingredient', $tableName, false, ); } final VerificationMeta _amountInGramsMeta = const VerificationMeta('amountInGrams'); GeneratedIntColumn _amountInGrams; @override GeneratedIntColumn get amountInGrams => _amountInGrams ??= _constructAmountInGrams(); GeneratedIntColumn _constructAmountInGrams() { return GeneratedIntColumn( 'amount', $tableName, false, ); } @override List get $columns => [recipe, ingredient, amountInGrams]; @override $IngredientInRecipesTable get asDslTable => this; @override String get $tableName => _alias ?? 'recipe_ingredients'; @override final String actualTableName = 'recipe_ingredients'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('recipe')) { context.handle(_recipeMeta, recipe.isAcceptableOrUnknown(data['recipe'], _recipeMeta)); } else if (isInserting) { context.missing(_recipeMeta); } if (data.containsKey('ingredient')) { context.handle( _ingredientMeta, ingredient.isAcceptableOrUnknown( data['ingredient'], _ingredientMeta)); } else if (isInserting) { context.missing(_ingredientMeta); } if (data.containsKey('amount')) { context.handle( _amountInGramsMeta, amountInGrams.isAcceptableOrUnknown( data['amount'], _amountInGramsMeta)); } else if (isInserting) { context.missing(_amountInGramsMeta); } return context; } @override Set get $primaryKey => {recipe, ingredient}; @override IngredientInRecipe map(Map data, {String tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; return IngredientInRecipe.fromData(data, _db, prefix: effectivePrefix); } @override $IngredientInRecipesTable createAlias(String alias) { return $IngredientInRecipesTable(_db, alias); } } abstract class _$Database extends GeneratedDatabase { _$Database(QueryExecutor e) : super(SqlTypeSystem.defaultInstance, e); _$Database.connect(DatabaseConnection c) : super.connect(c); $CategoriesTable _categories; $CategoriesTable get categories => _categories ??= $CategoriesTable(this); $RecipesTable _recipes; $RecipesTable get recipes => _recipes ??= $RecipesTable(this); $IngredientsTable _ingredients; $IngredientsTable get ingredients => _ingredients ??= $IngredientsTable(this); $IngredientInRecipesTable _ingredientInRecipes; $IngredientInRecipesTable get ingredientInRecipes => _ingredientInRecipes ??= $IngredientInRecipesTable(this); TotalWeightResult _rowToTotalWeightResult(QueryRow row) { return TotalWeightResult( title: row.readString('title'), totalWeight: row.readInt('total_weight'), ); } Selectable totalWeight() { return customSelect( 'SELECT r.title, SUM(ir.amount) AS total_weight\n FROM recipes r\n INNER JOIN recipe_ingredients ir ON ir.recipe = r.id\n GROUP BY r.id', variables: [], readsFrom: {recipes, ingredientInRecipes}).map(_rowToTotalWeightResult); } @override Iterable get allTables => allSchemaEntities.whereType(); @override List get allSchemaEntities => [categories, recipes, ingredients, ingredientInRecipes]; } class TotalWeightResult { final String title; final int totalWeight; TotalWeightResult({ this.title, this.totalWeight, }); @override int get hashCode => $mrjf($mrjc(title.hashCode, totalWeight.hashCode)); @override bool operator ==(dynamic other) => identical(this, other) || (other is TotalWeightResult && other.title == this.title && other.totalWeight == this.totalWeight); }