InputChannel.deserialize constructor

InputChannel.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory InputChannel.deserialize(BinaryReader reader) {
  // Read [InputChannel] fields.
  final channelId = reader.readInt64();
  final accessHash = reader.readInt64();

  // Construct [InputChannel] object.
  final returnValue = InputChannel(
    channelId: channelId,
    accessHash: accessHash,
  );

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