cursorSelectionOverlayItemsByType method
- 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:
- cursorSelectionOverlayItems - Get all overlay items under cursor
- setCursorScreenPosition - Set cursor position for selection
Implementation
List<OverlayItem> cursorSelectionOverlayItemsByType(
CommonOverlayId overlayId,
) {
return cursorSelectionOverlayItems().where((final OverlayItem item) {
return item.isOfType(overlayId);
}).toList();
}