BotsToggleUsername.deserialize constructor

BotsToggleUsername.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory BotsToggleUsername.deserialize(BinaryReader reader) {
  // Read [BotsToggleUsername] fields.
  final bot = reader.readObject() as InputUserBase;
  final username = reader.readString();
  final active = reader.readBool();

  // Construct [BotsToggleUsername] object.
  final returnValue = BotsToggleUsername(
    bot: bot,
    username: username,
    active: active,
  );

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