Maneuver.fromJson constructor
Maneuver.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Maneuver.fromJson(Map<String, dynamic> json) {
return Maneuver._(
type: json['type'],
instruction: json['instruction'] ?? '',
verbalSuccinctTransitionInstruction:
json['verbal_succinct_transition_instruction'],
verbalPreTransitionInstruction: json['verbal_pre_transition_instruction'],
verbalPostTransitionInstruction:
json['verbal_post_transition_instruction'],
time: double.tryParse(json['time'].toString()) ?? 0.0,
length: double.tryParse(json['length'].toString()) ?? 0.0,
cost: json['cost'],
beginShapeIndex: json['begin_shape_index'],
endShapeIndex: json['end_shape_index'],
rough: json['rough'],
travelMode: json['travel_mode'],
travelType: json['travel_type'],
);
}