addEntranceLocation method

bool addEntranceLocation({
  1. required Coordinates coordinates,
  2. required EntranceLocationType type,
})

Adds a new entrance location to this collection.

The method requests the platform to persist a new entrance with the provided coordinates and type. The operation may fail if the platform rejects the values or if the underlying object is read-only.

Parameters

  • coordinates: Coordinates of the new entrance.
  • type: Access type for the new entrance.

Returns

  • bool: true when the entrance was added successfully; false otherwise.

Implementation

bool addEntranceLocation({
  required final Coordinates coordinates,
  required final EntranceLocationType type,
}) {
  final OperationResult resultString = objectMethod(
    pointerId,
    'EntranceLocations',
    'addEntranceLocation',
    args: <String, dynamic>{
      'entranceType': type.id,
      'coordinates': coordinates,
    },
  );

  return resultString['result'];
}