I work on reading book app in flutter, i make the text selectable text, but the problem when i want share the selected text, thier is any way to do it ?
I try use onselectionchanged in selectable to capture the selected text but this not work
I work on reading book app in flutter, i make the text selectable text, but the problem when i want share the selected text, thier is any way to do it ?
I try use onselectionchanged in selectable to capture the selected text but this not work
2
Answers
onselectionchanged should work for you, although it is executed every time the user changes the selection, which I don’t think is what you want, the normal thing is to add a button to the context menu with the one you want to share in your case.
use contextMenuBuilder,
note: this example use url_launcher for send sms with the text, you need run
example: