HolodexClient constructor Null safety

HolodexClient(
  1. {required String apiKey,
  2. String basePath = 'https://holodex.net/api/v2',
  3. Client? httpClient}
)

Creates a new instance of HolodexClient

apiKey - Your personal API key. Be aware that the validity of the key is not checked, so ensure it is correct.

basePath - (Optional) The base Holodex API url. Can be overriden with the mock sever API url: https://stoplight.io/mocks/holodex/holodex/11620234

dioClient - An existing Dio Client, if needed. When left null, an internal client will be created

Implementation

HolodexClient({
  required this.apiKey,
  this.basePath = 'https://holodex.net/api/v2',
  Client? httpClient,
}) {
  if (httpClient == null) {
    _httpClient = Client();
  } else {
    _httpClient = httpClient;
  }
}