[英]How to setting code formatting for flutter in Android Studio
So i want to setting my code formatting for flutter in android studio I want it to look like this所以我想在 android 工作室中为 flutter 设置我的代码格式我希望它看起来像这样
but when i do Ctrl+Alt+L it becomes like this但是当我执行 Ctrl+Alt+L 时,它变成了这样
To make the code reformat as you want it to, you need to add a comma ,
at the end of all properties.要使代码按照您的需要重新格式化,您需要在所有属性的末尾添加一个逗号
,
。 Example:例子:
Container(
width: 10,
height: 10,
)
Without the last comma, you get this:没有最后一个逗号,你会得到:
Container(width: 10, height: 10)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.