AccountRegisterDevice.deserialize constructor

AccountRegisterDevice.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory AccountRegisterDevice.deserialize(BinaryReader reader) {
  // Read [AccountRegisterDevice] fields.
  final flags = reader.readInt32();
  final noMuted = (flags & 1) != 0;
  final tokenType = reader.readInt32();
  final token = reader.readString();
  final appSandbox = reader.readBool();
  final secret = reader.readBytes();
  final otherUids = reader.readVectorInt64();

  // Construct [AccountRegisterDevice] object.
  final returnValue = AccountRegisterDevice(
    noMuted: noMuted,
    tokenType: tokenType,
    token: token,
    appSandbox: appSandbox,
    secret: secret,
    otherUids: otherUids,
  );

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