onSelectionChanging property

VoidCallback? onSelectionChanging
final

Callback fired continuously while the user is dragging selection handles.

This callback helps prevent UI flicker and performance issues by allowing you to hide custom selection UI while the user is actively adjusting the selection. Once dragging stops, onSelection will be called with the final selection.

Typical usage:

onSelectionChanging: () {
  // Hide custom selection UI while user drags handles
  setState(() => showSelectionMenu = false);
}

See also:

Implementation

final VoidCallback? onSelectionChanging;