update method
- int index, {
- String? name,
- List<
Landmark> ? waypoints, - RoutePreferences? preferences,
Update a route
Parameters
- IN index The index of the route in the current sort order.
- IN name The new route name, must be unique. If a route with this name already exists the update fails.
- IN waypoints Route waypoints list.
- IN preferences Route preferences.
Only route relevant preferences are saved: transport mode + avoid preferences.
Throws
- An exception if it fails.
Implementation
void update(
final int index, {
final String? name,
final List<Landmark>? waypoints,
final RoutePreferences? preferences,
}) {
final LandmarkList landmarkList =
waypoints == null ? LandmarkList() : LandmarkList.fromList(waypoints);
objectMethod(
_pointerId,
'RouteBookmarks',
'update',
args: <String, dynamic>{
'index': index,
if (name != null) 'name': name,
'waypoints': landmarkList.pointerId,
if (preferences != null) 'preferences': preferences,
},
);
}