Path constructor
Path({
- List<
Coordinates> coordinates = const <Coordinates>[], - List<
int> waypoints = const <int>[], - String name = '',
Creates a Path from a list of coordinates and waypoints, with an optional name.
Parameters
coordinates: The list of Coordinates defining the path. Defaults to an empty list.waypoints: A list of integer indices referencing positions incoordinates. Defaults to an empty list.name: An optional human readable name for the path. Defaults to an empty string.
Returns
- A new Path instance containing the provided coordinates, waypoints, and name
Implementation
factory Path({
final List<Coordinates> coordinates = const <Coordinates>[],
final List<int> waypoints = const <int>[],
final String name = '',
}) {
final Path path = Path.fromCoordinatesWaypoints(
coordinates: coordinates,
waypoints: waypoints,
);
path.name = name;
return path;
}