KeyboardButtonRequestPhone.deserialize constructor
KeyboardButtonRequestPhone.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory KeyboardButtonRequestPhone.deserialize(BinaryReader reader) {
// Read [KeyboardButtonRequestPhone] fields.
final flags = reader.readInt32();
final hasStyleField = (flags & 1024) != 0;
final style =
hasStyleField ? reader.readObject() as KeyboardButtonStyleBase : null;
final text = reader.readString();
// Construct [KeyboardButtonRequestPhone] object.
final returnValue = KeyboardButtonRequestPhone(style: style, text: text);
// Now return the deserialized [KeyboardButtonRequestPhone].
return returnValue;
}