在Android Studio中使用Flutter时更改自动缩进线设置 [英] Change the Auto-Indent Lines setting when using Flutter in Android Studio
本文介绍了在Android Studio中使用Flutter时更改自动缩进线设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
自动缩进线会不正确地转移重定向构造函数的缩进.
Auto-Indent Lines improperly shifts indent of Redirecting constructors.
自动缩进的结果如下.
Project.getInbox()
: this.update(
foo: 1,
bar: 2,
baz: 3);
我想要的结果如下.
Project.getInbox()
: this.update(
foo: 1,
bar: 2,
baz: 3);
问题
- 如何在Android Studio中更改自动缩进线设置.
- Android Studio 3.1.4
- 尝试:我选中了首选项"->代码样式"->飞镖"->标签和缩进"以及包装和花括号" →错误:没有合适的地方.
- Tried : I checked "Preferences" -> "Code Style" -> "Dart" -> "Tabs and Indents" and "Wrapping and Braces" →Error : There is no applicable place.
最诚挚的问候,
推荐答案
Dart (and therefore Flutter) uses its own code formatter dartfmt, so it's not possible to control indentation etc through the IDE. In this case, dartfmt will format the code differently depending on the optional trailing comma.
无
Project.getInbox() : this.update(foo: 1, bar: 2, baz: 3);
使用
Project.getInbox()
: this.update(
foo: 1,
bar: 2,
baz: 3,
);
这篇关于在Android Studio中使用Flutter时更改自动缩进线设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文