RoadInfo.fromJson constructor

RoadInfo.fromJson(
  1. Map<String, dynamic> json
)

Deserializes a JSON-compatible map to create an instance.

Used internally, not intended for direct use by consumers. The expected map structure may change without notice.

Implementation

factory RoadInfo.fromJson(final Map<String, dynamic> json) {
  return RoadInfo(
    roadname: json['roadname'] ?? '',
    shieldtype: RoadShieldTypeExtension.fromId(
      json['shieldtype'] ?? RoadShieldType.invalid.id,
    ),
  );
}