Waypoint.fromJson constructor

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

Implementation

factory Waypoint.fromJson(Map<String, dynamic> json) {
  return Waypoint(
    hint: json['hint'],
    distance: json['distance'].toDouble(),
    name: json['name'],
    location:
        (json['location'] as List).map((loc) => loc.toDouble()).toList(),
  );
}