This extension provides a quick fix for invalid constant errors in Dart code within Visual Studio Code.
- Provides a quick fix to remove the
const
keyword from the invalid constant declaration. - Supports both quickFix and fixAll actions.
- Open a Dart file in Visual Studio Code.
- If there are any invalid constant errors, a lightbulb icon will appear next to the problematic code.
- Click on the lightbulb icon and select "Fix invalid constant" to apply the quick fix.
- To apply the fix All invalid constants in the source code, execute Fix All from command palette.
"editor.codeActionsOnSave": {
"source.fixAll": true,
},
Download and install this extension from the Visual Studio Code marketplace.