connectUser method

Future<OwnUser> connectUser(
  1. User user,
  2. String token,
  3. {bool connectWebSocket = true}
)

Connects the current user, this triggers a connection to the API. It returns a Future that resolves when the connection is setup. Pass connectWebSocket: false, if you want to connect to websocket at a later stage or use the client in connection-less mode

Implementation

Future<OwnUser> connectUser(
  User user,
  String token, {
  bool connectWebSocket = true,
}) =>
    _connectUser(
      user,
      token: Token.fromRawValue(token),
      connectWebSocket: connectWebSocket,
    );