getAllDayEventAtPos method

AllDayEvent<T>? getAllDayEventAtPos(
  1. Offset bandLocalPos
)

The all-day chip under bandLocalPos, or null if the point hits empty band space (#72). bandLocalPos is in the band canvas's own coordinate space — the same space AllDayEvent.screenRect lives in (full planner width, horizontal scroll already applied) — so a chip is hit when its on-screen rect contains the point. A linear scan: all-day chips are few and aren't day-bucketed like the timed events.

Implementation

AllDayEvent<T>? getAllDayEventAtPos(Offset bandLocalPos) {
  for (final AllDayEvent<T> chip in allDayEvents) {
    if (chip.screenRect.contains(bandLocalPos)) return chip;
  }
  return null;
}