Skip to content

remove SelectableText and make text selectable by default on web #78899

@nt4f04uNd

Description

@nt4f04uNd

i'm proposing that:

  1. any text would be selectable by default on web
  2. SelectableText should be removed - this should be a parameter selectable in TextStyle and Text should support being selectable out of the box. while SelectableText will be deprected it should support being not selectable as well, so the TextStyle selectable applied would be respected

motivation of those:

  1. users and developer expect that text is selectable on web
  2. current sepration between Text and SelectableText creates a lot of pain:
    • there's no way to easilty tweak whether text is selectable or not
    • some of the created widgets that didn't add an ability to have a selectable text (which are i guess 99%) limit developers, and not only in framework, same applies to their own written widgets and packages

original issue #32246

In Flutter, text isn't selectable by default. Try using SelectableText to enable selection of text. Please let us know if you face any issues.

this answer is weird and recieved a lot of backlash in the comments below, but the issue never was reopened

cc @mdebbar @ferhatb @dnfield

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: typographyText rendering, possibly libtxtc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.r: duplicateIssue is closed as a duplicate of an existing issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions