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