Skip to content

Color preview not showing in gutter #3925

Closed

Description

@trinib

Describe the bug
Dart : Flutter gutter icons option not showing color preview. On Vscode startup or windows reload it shows for 2 seconds and disappears.
Ps : Freshly installed Visual Code Studio with extensions dart & flutter only.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Settings UI'
  2. Click on 'Dart : Flutter gutter icons'

Expected behavior
Always show color preview in gutter.

Screenshots
gutter

Please complete the following information:

  • Operating System and version: Windows 10 Version 21H2 (OS Build 19044.1499) & Linux Mint 20.3 Una
  • VS Code version: v1.66.2
  • Dart extension version: v3.38.2
  • Dart/Flutter SDK version: v2.10.0
  • Target device (if the issue relates to Flutter debugging):

Activity

  1. changed the title [-]Color not showing gutter[/-] [+]Color preview not showing in gutter[/+] on Apr 13, 2022
  2. DanTup commented on Apr 20, 2022

    @DanTup
    Member

    Colours in the gutter are being removed, in favour of inline colours in the editor (which can open colour pickers). You can see the blue colour in the editor next to Colors.blue once analysis completes.

    The reason you currently see the colour in the gutter briefly is for compatibility - older Dart/Flutter SDKs don't have the capability to show the inline colours/colour pickers so we continue to render the legacy gutter colours initially, hiding them only once we know the Dart analysis server is providing colour information. In a future update they will be removed and that brief appearance will go away.

    The reason there's no Green colour in the new implementation, is that it was really a bug that they showed up for comments before (because it was just a regex across the file). Now the colours come from parsing the code, which means they can also work for static/constants in other files rather than only where the specific colour is written directly in the source file.

    Hope this makes sense!

  3. added and removed on Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions