RoadInfo.fromMap constructor

RoadInfo.fromMap(
  1. Map map
)

Implementation

RoadInfo.fromMap(Map map)
  : _key = map["key"] ?? UniqueKey().toString(),
    duration = map["duration"],
    distance = map["distance"],
    instructions = map.containsKey("instructions")
        ? (map["instructions"] as List)
              .map((e) => Instruction.fromMap(e))
              .toList()
        : [],
    route = map.containsKey('routePoints')
        ? (map["routePoints"] as String).stringToGeoPoints()
        : [];