PhotoCachedSize.deserialize constructor

PhotoCachedSize.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory PhotoCachedSize.deserialize(BinaryReader reader) {
  // Read [PhotoCachedSize] fields.
  final type = reader.readString();
  final w = reader.readInt32();
  final h = reader.readInt32();
  final bytes = reader.readBytes();

  // Construct [PhotoCachedSize] object.
  final returnValue = PhotoCachedSize(
    type: type,
    w: w,
    h: h,
    bytes: bytes,
  );

  // Now return the deserialized [PhotoCachedSize].
  return returnValue;
}