encodeHeader method

  1. @override
String encodeHeader()

Implementation

@override
String encodeHeader() {
  String baseURLOptions =
      "/routed-${routingType.name}/${profile.name}/v1/driving/${waypoints.toWaypoints()}";
  var option = "";
  option += "steps=$steps&";
  option += "overview=${overview.value}&";
  option += "geometries=${geometries.value}";
  if (hasAlternative != null) {
    option += "&alternatives=$hasAlternative";
  }

  if (profile == Profile.trip) {
    option +=
        "&source=${source.name}&destination=${destination.name}&roundtrip=$roundTrip";
  }
  return "$baseURLOptions?$option";
}