OpenRouteService constructor

OpenRouteService({
  1. required String apiKey,
  2. String baseUrl = OpenRouteService.defaultBaseUrl,
  3. Client? client,
  4. ORSProfile defaultProfile = ORSProfile.footWalking,
})

Implementation

OpenRouteService({
  required String apiKey,
  String baseUrl = OpenRouteService.defaultBaseUrl,
  http.Client? client,
  ORSProfile defaultProfile = ORSProfile.footWalking,
})  : _apiKey = apiKey,
      _baseUrl = baseUrl,
      _defaultProfile = defaultProfile {
  // Initialize HTTP client if not provided.
  _client = client ?? http.Client();
}