JsonRestApiClient constructor

JsonRestApiClient(
  1. Uri? baseUrl, {
  2. String? bearerToken,
  3. Client? httpClient,
})

Set the baseUrl and an optional bearerToken. Overwrite httpClient with a mock client for testing.

Implementation

JsonRestApiClient(
  this.baseUrl, {
  this.bearerToken,
  Client? httpClient,
}) : httpClient = httpClient ?? Client();