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