114 lines
3.5 KiB
Dart
114 lines
3.5 KiB
Dart
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||
|
|
|
||
|
|
part of 'sake_item.dart';
|
||
|
|
|
||
|
|
// **************************************************************************
|
||
|
|
// TypeAdapterGenerator
|
||
|
|
// **************************************************************************
|
||
|
|
|
||
|
|
class SakeItemAdapter extends TypeAdapter<SakeItem> {
|
||
|
|
@override
|
||
|
|
final int typeId = 0;
|
||
|
|
|
||
|
|
@override
|
||
|
|
SakeItem read(BinaryReader reader) {
|
||
|
|
final numOfFields = reader.readByte();
|
||
|
|
final fields = <int, dynamic>{
|
||
|
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||
|
|
};
|
||
|
|
return SakeItem(
|
||
|
|
id: fields[0] as String,
|
||
|
|
legacyName: fields[1] as String?,
|
||
|
|
legacyBrand: fields[2] as String?,
|
||
|
|
legacyPrefecture: fields[3] as String?,
|
||
|
|
legacyDescription: fields[4] as String?,
|
||
|
|
legacyCatchCopy: fields[5] as String?,
|
||
|
|
legacyImagePaths: (fields[6] as List?)?.cast<String>(),
|
||
|
|
legacySweetnessScore: fields[7] as double?,
|
||
|
|
legacyBodyScore: fields[8] as double?,
|
||
|
|
legacyCreatedAt: fields[9] as DateTime?,
|
||
|
|
legacyConfidenceScore: fields[10] as int?,
|
||
|
|
legacyFlavorTags: (fields[11] as List?)?.cast<String>(),
|
||
|
|
legacyIsFavorite: fields[12] as bool?,
|
||
|
|
legacyTasteStats: (fields[13] as Map?)?.cast<String, int>(),
|
||
|
|
legacyIsUserEdited: fields[14] as bool?,
|
||
|
|
legacyCostPrice: fields[15] as int?,
|
||
|
|
legacyManualPrice: fields[16] as int?,
|
||
|
|
legacyMarkup: fields[17] as double?,
|
||
|
|
legacyPriceVariants: (fields[18] as Map?)?.cast<String, int>(),
|
||
|
|
)
|
||
|
|
.._displayData = fields[20] as DisplayData?
|
||
|
|
.._hiddenSpecs = fields[21] as HiddenSpecs?
|
||
|
|
.._userData = fields[22] as UserData?
|
||
|
|
.._gamification = fields[23] as Gamification?
|
||
|
|
.._metadata = fields[24] as Metadata?
|
||
|
|
.._itemType = fields[25] as ItemType?;
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
void write(BinaryWriter writer, SakeItem obj) {
|
||
|
|
writer
|
||
|
|
..writeByte(25)
|
||
|
|
..writeByte(0)
|
||
|
|
..write(obj.id)
|
||
|
|
..writeByte(20)
|
||
|
|
..write(obj._displayData)
|
||
|
|
..writeByte(21)
|
||
|
|
..write(obj._hiddenSpecs)
|
||
|
|
..writeByte(22)
|
||
|
|
..write(obj._userData)
|
||
|
|
..writeByte(23)
|
||
|
|
..write(obj._gamification)
|
||
|
|
..writeByte(24)
|
||
|
|
..write(obj._metadata)
|
||
|
|
..writeByte(25)
|
||
|
|
..write(obj._itemType)
|
||
|
|
..writeByte(1)
|
||
|
|
..write(obj.legacyName)
|
||
|
|
..writeByte(2)
|
||
|
|
..write(obj.legacyBrand)
|
||
|
|
..writeByte(3)
|
||
|
|
..write(obj.legacyPrefecture)
|
||
|
|
..writeByte(4)
|
||
|
|
..write(obj.legacyDescription)
|
||
|
|
..writeByte(5)
|
||
|
|
..write(obj.legacyCatchCopy)
|
||
|
|
..writeByte(6)
|
||
|
|
..write(obj.legacyImagePaths)
|
||
|
|
..writeByte(7)
|
||
|
|
..write(obj.legacySweetnessScore)
|
||
|
|
..writeByte(8)
|
||
|
|
..write(obj.legacyBodyScore)
|
||
|
|
..writeByte(9)
|
||
|
|
..write(obj.legacyCreatedAt)
|
||
|
|
..writeByte(10)
|
||
|
|
..write(obj.legacyConfidenceScore)
|
||
|
|
..writeByte(11)
|
||
|
|
..write(obj.legacyFlavorTags)
|
||
|
|
..writeByte(12)
|
||
|
|
..write(obj.legacyIsFavorite)
|
||
|
|
..writeByte(13)
|
||
|
|
..write(obj.legacyTasteStats)
|
||
|
|
..writeByte(14)
|
||
|
|
..write(obj.legacyIsUserEdited)
|
||
|
|
..writeByte(15)
|
||
|
|
..write(obj.legacyCostPrice)
|
||
|
|
..writeByte(16)
|
||
|
|
..write(obj.legacyManualPrice)
|
||
|
|
..writeByte(17)
|
||
|
|
..write(obj.legacyMarkup)
|
||
|
|
..writeByte(18)
|
||
|
|
..write(obj.legacyPriceVariants);
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
int get hashCode => typeId.hashCode;
|
||
|
|
|
||
|
|
@override
|
||
|
|
bool operator ==(Object other) =>
|
||
|
|
identical(this, other) ||
|
||
|
|
other is SakeItemAdapter &&
|
||
|
|
runtimeType == other.runtimeType &&
|
||
|
|
typeId == other.typeId;
|
||
|
|
}
|