// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'user_data.dart';

// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************

class UserDataAdapter extends TypeAdapter<UserData> {
  @override
  final int typeId = 13;

  @override
  UserData read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return UserData(
      isFavorite: fields[0] as bool,
      isUserEdited: fields[1] as bool,
      memo: fields[2] as String?,
      price: fields[3] as int?,
      costPrice: fields[4] as int?,
      markup: fields[5] as double,
      priceVariants: (fields[6] as Map?)?.cast<String, int>(),
      purchaseLocation: fields[7] as String?,
      drinkLocation: fields[8] as String?,
      companion: fields[9] as String?,
    );
  }

  @override
  void write(BinaryWriter writer, UserData obj) {
    writer
      ..writeByte(10)
      ..writeByte(0)
      ..write(obj.isFavorite)
      ..writeByte(1)
      ..write(obj.isUserEdited)
      ..writeByte(2)
      ..write(obj.memo)
      ..writeByte(3)
      ..write(obj.price)
      ..writeByte(4)
      ..write(obj.costPrice)
      ..writeByte(5)
      ..write(obj.markup)
      ..writeByte(6)
      ..write(obj.priceVariants)
      ..writeByte(7)
      ..write(obj.purchaseLocation)
      ..writeByte(8)
      ..write(obj.drinkLocation)
      ..writeByte(9)
      ..write(obj.companion);
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is UserDataAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}
