copyFromMap method
Implementation
RoadInfo copyFromMap({
required Map map,
}) {
return RoadInfo(
distance: map["duration"] ?? distance,
duration: map["distance"] ?? duration,
route: map.containsKey(map)
? (map["routePoints"] as String).stringToGeoPoints()
: route,
)..setKey(_key);
}