Flutter-Ernaehrungsapp/lib/android/models/food.g.dart

66 lines
1.6 KiB
Dart
Raw Normal View History

2023-05-29 12:08:46 +02:00
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'food.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class FoodAdapter extends TypeAdapter<Food> {
@override
final int typeId = 1;
@override
Food read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return Food(
fields[0] as dynamic,
fields[1] as dynamic,
fields[2] as dynamic,
fields[3] as dynamic,
fields[4] as dynamic,
fields[5] as dynamic,
fields[6] as dynamic,
fields[7] as dynamic,
fields[8] as dynamic,
);
}
@override
void write(BinaryWriter writer, Food obj) {
writer
..writeByte(9)
..writeByte(0)
..write(obj.id)
..writeByte(1)
..write(obj.name)
..writeByte(2)
..write(obj.foodGroup)
..writeByte(3)
..write(obj.calories)
..writeByte(4)
..write(obj.fatg)
..writeByte(5)
..write(obj.proteing)
..writeByte(6)
..write(obj.carbohydrateg)
..writeByte(7)
..write(obj.sugarsg)
..writeByte(8)
..write(obj.fiberg);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is FoodAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}