getCoordinates method

Coordinates? getCoordinates(
  1. int index
)

Returns the Coordinates for the entrance at the given index.

If index is outside the valid range for this collection the method returns null.

Parameters

  • index: Zero-based index of the entrance to retrieve.

Returns

  • Coordinates?: The entrance coordinates, or null when index is out of range.

Also see:

  • count — Get the total number of entrances.

Implementation

Coordinates? getCoordinates(final int index) {
  if (index > count) {
    return null;
  }

  final OperationResult resultString = objectMethod(
    pointerId,
    'EntranceLocations',
    'getCoordinates',
    args: index,
  );

  return Coordinates.fromJson(resultString['result']);
}