// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'address_model.dart';

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

class AddressModelAdapter extends TypeAdapter<AddressModel> {
  @override
  final typeId = 30;

  @override
  AddressModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return AddressModel(
      name: fields[0] as String,
      addressTitle: fields[1] as String,
      addressLine1: fields[2] as String,
      phone: fields[3] as String,
      email: fields[4] as String?,
      fax: fields[5] as String?,
      taxCode: fields[6] as String?,
      cityCode: fields[7] as String,
      wardCode: fields[8] as String,
      isDefault: fields[9] == null ? false : fields[9] as bool,
      cityName: fields[10] as String?,
      wardName: fields[11] as String?,
      isAllowEdit: fields[12] == null ? true : fields[12] as bool,
    );
  }

  @override
  void write(BinaryWriter writer, AddressModel obj) {
    writer
      ..writeByte(13)
      ..writeByte(0)
      ..write(obj.name)
      ..writeByte(1)
      ..write(obj.addressTitle)
      ..writeByte(2)
      ..write(obj.addressLine1)
      ..writeByte(3)
      ..write(obj.phone)
      ..writeByte(4)
      ..write(obj.email)
      ..writeByte(5)
      ..write(obj.fax)
      ..writeByte(6)
      ..write(obj.taxCode)
      ..writeByte(7)
      ..write(obj.cityCode)
      ..writeByte(8)
      ..write(obj.wardCode)
      ..writeByte(9)
      ..write(obj.isDefault)
      ..writeByte(10)
      ..write(obj.cityName)
      ..writeByte(11)
      ..write(obj.wardName)
      ..writeByte(12)
      ..write(obj.isAllowEdit);
  }

  @override
  int get hashCode => typeId.hashCode;

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