Skip to content

[Feature request] Make multi-line string literals foldable #5139

@andrewkolos

Description

@andrewkolos

Consider a multi-line string in a .dart file:

final bigString = '''
I am a multiline string.
I might be really long.
For example, I could be an entire Android manifest (the XML you would find in an AndroidManifest.xml file)
that's defined in a test file.
'''

It would be nice if I could fold this. This is something I can do with multi-line string literals in JS/TS:

image

image

Describe alternatives you've considered
The user can manually create folding regions using the "Create Folding Range from Selection", but it's generally not worth the time to do this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresis enhancementrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions