cloneStartEnd method

Path cloneStartEnd(
  1. Coordinates start,
  2. Coordinates end
)

Clone path from the given coordinates.

Set start = end to create a circuit track.

Creates a cloned Path using the provided start and end coordinates.

If start and end are equal the resulting path will form a circuit.

Parameters

Returns

  • A new Path instance cloned from this path with the specified start and end coordinates.

Implementation

Path cloneStartEnd(final Coordinates start, final Coordinates end) {
  final OperationResult resultString = objectMethod(
    pointerId,
    'Path',
    'cloneStartEnd',
    args: <String, Coordinates>{'first': start, 'second': end},
  );

  return Path.init(resultString['result']);
}