onSelection property
Callback when text is selected with WebView-relative coordinates.
Fires when:
- User completes initial text selection
- User finishes dragging selection handles (after a 300ms debounce)
Use this callback to display custom UI at the selection position. Coordinates are relative to the WebView, not the screen.
See also:
- onSelectionChanging - Called while user is actively dragging handles
- onDeselection - Called when selection is cleared
Implementation
final EpubSelectionCallback? onSelection;