cursorSelectionOverlayItemsByType method

List<OverlayItem> cursorSelectionOverlayItemsByType(
  1. CommonOverlayId overlayId
)

Retrieves overlay items of a specific type under the cursor location.

Returns only the overlay items that match the specified overlay ID type from all overlay items at the cursor position. Use setCursorScreenPosition to set the cursor location before calling this method.

Parameters

  • overlayId: The overlay ID type to filter by, determining which overlay items to include

Returns

  • List of OverlayItem objects matching the specified type under the cursor, or an empty list if none found

See also:

Implementation

List<OverlayItem> cursorSelectionOverlayItemsByType(
  CommonOverlayId overlayId,
) {
  return cursorSelectionOverlayItems().where((final OverlayItem item) {
    return item.isOfType(overlayId);
  }).toList();
}