RoadInfo.fromMap constructor

RoadInfo.fromMap(
  1. Map map
)

Implementation

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