toJson method
Converts the DirectionRouteSegmentStep to a Map with keys 'distance', 'duration', 'type', 'instruction', 'name', and 'way_points'.
Implementation
Map<String, dynamic> toJson() => <String, dynamic>{
'distance': distance,
'duration': duration,
'type': type,
'instruction': instruction,
'name': name,
'way_points': wayPoints,
};