NavigationTracepoint.fromJson constructor
NavigationTracepoint.fromJson(
- Map<String, dynamic> json
)
Implementation
NavigationTracepoint.fromJson(Map<String, dynamic> json) {
name = json['name'] as String?;
distance = (json['distance'] as num?)?.toDouble();
matchingsIndex = (json['matchings_index'] as num?)?.toInt();
waypointIndex = (json['waypoint_index'] as num?)?.toInt();
alternativesCount = (json['alternatives_count'] as num?)?.toInt();
if (json.containsKey('location') && json['location'] != null) {
location = List<double>.from(
json['location'] as List<dynamic>,
);
}
}