indexOf method

int indexOf(
  1. {required ImmutablePart immutablePart}
)

Retrieves the position of the given part in the immutable part collection.

Parameters:

  • immutablePart — The part you want to find.

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

Implementation

int indexOf({required ImmutablePart immutablePart}) {
  return _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_ImmutablePartCollection_indexOf(
        _handle, immutablePart._handle, errorHandler);
  });
}