Skip to content

Pasting code with unknown color symbol prefixes it with colorScheme. #4757

@lukehutch

Description

@lukehutch

Describe the bug

Select code like this:

image

Paste into another class, where the field Color backgroundColor is not present:

image

The onTap and icon fields are pasted as-is. However, backgroundColor gets transformed into colorScheme.background.

This is unexpected, and frankly weird...

It may have something to do with the special rendering of colors in Dart-Code, with a color swatch thumbnail.

Please complete the following information:

  • Operating System and version: Linux
  • VS Code version: latest
  • Dart extension version: latest
  • Dart/Flutter SDK version: latest
  • Target device (if the issue relates to Flutter debugging):

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresis bugrelies 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