getHighlightGroupItemIndex method

int getHighlightGroupItemIndex(
  1. int idx, {
  2. int highlightId = 0,
})

Get group highlighted item index for the given highlighted item index (in original list).

Returns the index of the group item that contains the highlighted item identified by idx. Use highlightId to resolve the group within a specific highlight collection when multiple highlight sets are present.

Parameters

  • idx: The highlighted item index in the original list to look up.
  • highlightId: Optional highlight collection id (defaults to 0).

Returns

  • The group index in the highlighted items' original list. On error the function returns an error code as an integer.

Implementation

int getHighlightGroupItemIndex(final int idx, {final int highlightId = 0}) {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'MapViewExtensions',
    'getHighlightGroupItemIndex',
    args: <String, int>{'idx': idx, 'highlightId': highlightId},
    dependencyId: _mapControllerId,
  );

  return resultString['result'];
}