OsrmLane.fromMap constructor

OsrmLane.fromMap(
  1. Map<String, dynamic> json
)

fromMap method to get the OsrmLane from a json map

Implementation

factory OsrmLane.fromMap(Map<String, dynamic> json) {
  return OsrmLane(
    valid: json['valid'],
    indications: json['indications'] != null
        ? (json['indications'] as List).map((e) {
            if (e is String) return OsrmLaneIndication(indication: e);
            return OsrmLaneIndication.fromMap(e);
          }).toList()
        : null,
  );
}