RestApi constructor

RestApi({
  1. required Client client,
  2. required String database,
  3. String basePath = '',
  4. String? idToken,
  5. Timeout? timeout,
  6. WriteSizeLimit? writeSizeLimit,
})

Default constructor.

If client is as SSEClient, it is directly used as this.client. Otherwise, SSEClient.proxy is used to create a SSEClient from the given simple Client.

Implementation

RestApi({
  required Client client,
  required this.database,
  this.basePath = '',
  this.idToken,
  this.timeout,
  this.writeSizeLimit,
}) : client = client is SSEClient ? client : SSEClient.proxy(client);