Text selection events and notifications
Nutrient Flutter SDK lets you listen to various events that occur when the end user selects text in a document.
Text selection events
Nutrient Flutter SDK supports text selection through adding event listeners to the PspdfkitWidget
:
-
onTextSelectionChanged
— Called when the text selection is changed with the new selected text. This event is triggered when a user selects text in a document.
To listen to these events, add an event listener to the PspdfkitWidget
:
PspdfkitWidgetController.addEventListener(NutrientEvent.textSelection, (event) { print('Text selection changed: $event'); });
For more advanced use cases, consider exploring the Nutrient native and web SDKs for customization. Refer to the Nutrient Flutter SDK customization guide and the following documentation links for more information: