14

I have this problem only when using Flutter Web version. 2.8 and 2.10 , when I tried using Flutter 2.5.3 and other previous version the problem doesn't happen.

Example Widget inside Column:

SelectableText("'Lorem Ipsum is simply dummy '",)),
SizedBox(height: 20),
Divider(),
SelectableText("'Lorem Ipsum is simply dummy text '",)),

The output:

enter image description here

When I clicked the bottom selectable or other widget beside the selectable text it doesnt deselect the previously selected text, and also when I selected a new text on another selectable text the previous selection on the top is still highlighted which is not the behaviour I expected.

Is there some change on this widget on the newest version that I didn't notice? Thanks

Rohith Nambiar
  • 2,957
  • 4
  • 17
  • 37
Jolzal
  • 547
  • 7
  • 19

1 Answers1

2

You can update your SDK version of Flutter to 3.3 and use SelectionArea class:

A widget that introduces an area for user selections with adaptive selection controls.

This widget creates a SelectableRegion with platform-adaptive selection controls.

as described on this Medium Article: What’s new in Flutter 3.3.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 04 '22 at 12:46