GoogleWebService constructor

GoogleWebService({
  1. String? apiKey,
  2. required String apiPath,
  3. String? baseUrl,
  4. Client? httpClient,
  5. Map<String, String>? apiHeaders,
})

Implementation

GoogleWebService({
  String? apiKey,
  required String apiPath,
  String? baseUrl,
  Client? httpClient,
  Map<String, String>? apiHeaders,
})  : _httpClient = httpClient ?? Client(),
      _apiKey = apiKey,
      _apiHeaders = apiHeaders {
  Uri uri = Uri.parse(NeomMapsUrls.kGMapsUrl);

  if (baseUrl != null) {
    uri = Uri.parse(baseUrl);
  }

  _url = uri.replace(path: '${uri.path}$apiPath');
}