connect static method

Future<User> connect(
  1. String userId, {
  2. String? nickname,
  3. String? accessToken,
  4. String? apiHost,
  5. String? wsHost,
})

Connects to SendbirdChat with given User ID and auth token. If you have created Users without auth token, refer to connect or just pass auth token with null.

Implementation

static Future<User> connect(
  String userId, {
  String? nickname,
  String? accessToken,
  String? apiHost,
  String? wsHost,
}) async {
  sbLog.i(StackTrace.current, 'userId: $userId');

  return await _instance._chat.connect(
    userId,
    nickname: nickname,
    accessToken: accessToken,
    apiHost: apiHost,
    wsHost: wsHost,
  );
}