【问题标题】:How to auto add 'const' in Flutter in VS Code?如何在 VS Code 中的 Flutter 中自动添加“const”?
【发布时间】:2022-08-05 15:20:00
【问题描述】:

在 VS Code 中,如何在按下 (ctrl + s) 时自动添加 const ?

    标签: flutter visual-studio-code constants


    【解决方案1】:

    **要在 VS Code 中在 Flutter 中保存文件时添加 auto const 功能,您应该按照以下步骤操作:**

    1-) 按 (ctrl + P) 然后搜索 (settings.json) 文件。

    2-) 将此代码行添加到那里;

    "editor.codeActionsOnSave": {
        "source.fixAll": true
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-02-07
      • 2020-06-06
      • 2017-09-11
      • 1970-01-01
      • 2022-12-07
      • 2020-02-19
      • 2020-05-05
      • 2022-10-06
      相关资源
      最近更新 更多