RoomInfo.fromBytes constructor

RoomInfo.fromBytes(
  1. Uint8List data
)

Implementation

factory RoomInfo.fromBytes(Uint8List data) {
  return RoomInfo(
    flags: data[0],
    maxPlayers: data[1] << 8 | data[2],
    currentId: data[3] << 8 | data[4],
    roomId: data.sublist(5),
  );
}