indexOf method

int indexOf(
  1. {required MutablePart mutablePart}
)

Retrieves the position of the segment in the mutable part collection. The first segment that is equal to the supplied segment is returned.

Parameters:

  • mutablePart — The part to find.

Return Value: The position of the segment in the collection, -1 otherwise.

Implementation

int indexOf({required MutablePart mutablePart}) {
  return _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_MutablePartCollection_indexOf(
        _handle, mutablePart._handle, errorHandler);
  });
}