In VS Code, Flutter language classes and widgets are not colored for me, but some words are blue

Viewed 128

In Visual Studio Code, Flutter language classes and widgets are not colored for me, but some words are blue . The Flutter and Dart plugins are installed and flutter doctor run without any problem. Please look at this: enter image description here

2 Answers

Open Settings (Cmd+, on Mac), and search for theme color. You will find a Workbench: Color Theme setting. Here select Dark+ or Light+ and that should help.

Another option if you don't want to use the Dark+ or Light+ themes (as a matter of taste e.g., I personally prefer the Visual Studio Dark - C++ theme) is to add the following to your settings.json:

"editor.tokenColorCustomizations": {
    "textMateRules": [
        {
            "scope": ["support.class.dart"],
            "settings": {
                "foreground": "#4EC9B0" // the C++ theme class color
            }
        }
    ]
},
Related