toRoute method

Route toRoute({
  1. ValhallaUnit unit = ValhallaUnit.km,
  2. int accuracyExponent = 5,
})

Implementation

Route toRoute({
  ValhallaUnit unit = ValhallaUnit.km,
  int accuracyExponent = 5,
}) {
  final alters = alternates?.map((e) => e.toRoute()).toList();
  final road = trip.toRoute(
    unit: unit,
    accuracyExponent: accuracyExponent,
  );
  return road.copyWith(alternativesRoads: alters);
}