KeyboardButtonUserProfile.deserialize constructor

KeyboardButtonUserProfile.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory KeyboardButtonUserProfile.deserialize(BinaryReader reader) {
  // Read [KeyboardButtonUserProfile] fields.
  final text = reader.readString();
  final userId = reader.readInt64();

  // Construct [KeyboardButtonUserProfile] object.
  final returnValue = KeyboardButtonUserProfile(
    text: text,
    userId: userId,
  );

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