copyFromMap method

RoadInfo copyFromMap({
  1. required Map map,
})

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);
}