ronjb / selectable

A Flutter widget that enables text selection over all the text widgets it contains
MIT License
18 stars 14 forks source link

weird issue on IOS and Android when try to select any text #14

Closed himanshu64 closed 1 year ago

himanshu64 commented 1 year ago

any idea How to fix this issue?

https://user-images.githubusercontent.com/13599427/224989277-84d5a944-7cdf-47c7-a53f-cae8481f2b45.mp4

ronjb commented 1 year ago

That type of problem can occur if the Selectable widget is a parent of the Scrollable widget. The Selectable widget must be a child of the Scrollable, like this:

Scaffold(
  body: SingleChildScrollView(
    child: Selectable(
      child: Column(
        children: [
          Text('... a lot of text ...'),
          // ... more widgets of any type that might contain text ...
        ],
      )
    )
  )
)

If the Selectable widget is properly place in the widgets tree, can you provide some example code that exhibits the problem? Then I can debug what's happening. Thanks.

himanshu64 commented 1 year ago

@ronjb Thanks for helping on this man, it's working perfectly now