ContactsSearch.deserialize constructor

ContactsSearch.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory ContactsSearch.deserialize(BinaryReader reader) {
  // Read [ContactsSearch] fields.
  final flags = reader.readInt32();
  final broadcasts = (flags & 1) != 0;
  final bots = (flags & 2) != 0;
  final q = reader.readString();
  final limit = reader.readInt32();

  // Construct [ContactsSearch] object.
  final returnValue = ContactsSearch(
    broadcasts: broadcasts,
    bots: bots,
    q: q,
    limit: limit,
  );

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