cursorSelectionOverlayItemsByType method

List<OverlayItem> cursorSelectionOverlayItemsByType(
  1. CommonOverlayId overlayId
)

Retrieve the list of overlay items under the cursor location.

Use setCursorScreenPosition to set the cursor location.

Parameters

  • IN overlayId The overlay id to filter the overlay items.

Returns

A list of OverlayItem objects under the cursor. If no overlay items are found, the list will be empty.

Implementation

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