Emi*_*zun 11 constants visual-studio-code flutter
在 VS Code 中,如何在按 (ctrl + s) 时自动添加 const ?
Emi*_*zun 24
**要在 VS Code 中保存 Flutter 中的文件时添加自动 const 功能,您应该按照以下步骤操作:**
1-) 按 (ctrl + P) 然后搜索 (settings.json) 文件。
2-) 将此代码行添加到那里;
"editor.codeActionsOnSave": {
"source.fixAll": true
}
Run Code Online (Sandbox Code Playgroud)
ctrl+ shift+ Psettings.json
添加以下代码
"editor.codeActionsOnSave": {
"source.fixAll": true
}
Run Code Online (Sandbox Code Playgroud)
注意:简化并更新了 @Emirhan 的答案并进行了必要的更改
| 归档时间: |
|
| 查看次数: |
9809 次 |
| 最近记录: |