getPart method

ImmutablePart getPart({
  1. required int index,
})

Returns a part at the specified index in the immutable part collection. A part is represented by an immutable collection of segments.

Parameters:

  • index — Position to retrieve the part.

Return Value: the immutable part at the specified part index.

Implementation

ImmutablePart getPart({
  required int index,
}) {
  final objectHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_ImmutablePartCollection_getPart(
      _handle,
      index,
      errorHandler,
    );
  });
  return ImmutablePart._fromHandle(
    objectHandle,
  )!;
}