// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'payment_card_model.dart';

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

class PaymentCardModelAdapter extends TypeAdapter<PaymentCardModel> {
  @override
  final int typeId = 2;

  @override
  PaymentCardModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return PaymentCardModel(
      id: fields[0] as String,
      issuerName: fields[1] as String,
      last4: fields[2] as String,
      colorHex: fields[3] as String,
      iconName: fields[4] as String,
      isDefault: fields[5] as bool,
    );
  }

  @override
  void write(BinaryWriter writer, PaymentCardModel obj) {
    writer
      ..writeByte(6)
      ..writeByte(0)
      ..write(obj.id)
      ..writeByte(1)
      ..write(obj.issuerName)
      ..writeByte(2)
      ..write(obj.last4)
      ..writeByte(3)
      ..write(obj.colorHex)
      ..writeByte(4)
      ..write(obj.iconName)
      ..writeByte(5)
      ..write(obj.isDefault);
  }

  @override
  int get hashCode => typeId.hashCode;

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