canPush method Null safety

bool canPush()

Implementation

bool canPush() {
  return socket.isConnected() && isJoined();
}