write method

  1. @override
void write(
  1. BinaryWriter writer,
  2. PersistentShoppingCartItem obj
)
override

Is called when a value has to be encoded.

Implementation

@override
void write(BinaryWriter writer, PersistentShoppingCartItem obj) {
  writer
    ..writeByte(9)
    ..writeByte(0)
    ..write(obj.productId)
    ..writeByte(1)
    ..write(obj.productName)
    ..writeByte(2)
    ..write(obj.productDescription)
    ..writeByte(3)
    ..write(obj.productThumbnail)
    ..writeByte(4)
    ..write(obj.productImages)
    ..writeByte(5)
    ..write(obj.unitPrice)
    ..writeByte(6)
    ..write(obj.quantity)
    ..writeByte(7)
    ..write(obj.productDetails)
    ..writeByte(8)
    ..write(obj.key);
}