toUri method

Uri toUri({
  1. String? apiKey,
})

Implementation

Uri toUri({String? apiKey}) {
  validateKey(apiKey);

  if (proxy != null) {
    return proxy!.replace(
      queryParameters: _getParams(),
    );
  }

  return Uri.https(
    "api.mapbox.com",
    "directions/v5/mapbox",
    _getParams()
      ..addAll(
        {
          'key': apiKey,
        },
      ),
  );
}