toMap method
toMap method to convert the parameters to a map
Implementation
Map<String, dynamic> toMap() {
final map = <String, dynamic>{};
if (bearings != null) {
map['bearings'] = bearings!.map((e) => e.join(',')).join(';');
}
if (radiuses != null) {
map['radiuses'] = radiuses!.join(';');
}
if (generateHints != null) {
map['generate_hints'] = generateHints!;
}
if (hints != null) {
map['hints'] = hints!.join(';');
}
if (approaches != null) {
map['approaches'] = approaches!
.map((e) => e.map((e) => e.toString().split('.').last).join(','))
.join(';');
}
if (exclude != null) {
map['exclude'] = exclude!.join(',');
}
if (snapping != null) {
map['snapping'] = snapping!;
}
if (skipWaypoints != null) {
map['skip_waypoints'] = skipWaypoints!.join(';');
}
if (classes != null) {
map['classes'] = classes!.join(',');
}
return map;
}