toggleSelectionAt method

CanvasObject? toggleSelectionAt(
  1. double x,
  2. double y
)

Toggles the topmost object at x, y in the current selection.

Implementation

CanvasObject? toggleSelectionAt(double x, double y) {
  final object = hitTest(x, y);
  final id = object?.id;
  if (id != null) toggleSelection(id);
  return object;
}