Flutter: Make text/images selectable in whole web app

Viewed 89

In the Flutter web apps, there is no default functionality which makes text and images in the app selectable.

Is there a way to enable selection functionality for text/image on web?

I did check SelectableText widget but it is only for text and I would need to use it over every text. Also, you can't select text in multiple SelectableText widgets at once, you can only select text in one of them. I'm looking for a solution to select all text in the app without making change to every text widget.

Let me know if there’s one step solution to achieve this thing in whole web app.

1 Answers

Flutter Web currently does not support multiple text selection across SelectableText widgets.

However, there are some experimental widgets that people are currently working on. According to a guide available at:

Custom SelectableScope Widget

They have proposed a custom widget, a Selectable scope, which basically allows for anything within it to be selectable (currently text and images)

NOTE: THIS IS CURRENTLY UNDER EXPERIMENTATION AND MIGHT CHANGE AS MENTIONED IN THE PROVIDED LINK.

Related