TextImage.deserialize constructor

TextImage.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory TextImage.deserialize(BinaryReader reader) {
  // Read [TextImage] fields.
  final documentId = reader.readInt64();
  final w = reader.readInt32();
  final h = reader.readInt32();

  // Construct [TextImage] object.
  final returnValue = TextImage(
    documentId: documentId,
    w: w,
    h: h,
  );

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