createClient method

TdClient createClient()

Creates a TDLib client and sends it a first request, which makes TDLib start it: updateAuthorizationState with authorizationStateWaitTdlibParameters follows. Subscribe to TdClient.authorizationStates right after this call.

Implementation

TdClient createClient() {
  _checkOpen();
  final client = TdClient._(this, tdjson.tdCreateClientId());
  _clients[client.id] = client;
  client.invoke(const GetOption(name: 'version')).ignore();
  return client;
}