Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
834 views
in Technique[技术] by (71.8m points)

Android Studio编辑dart文件怎么设置换行缩进空格数

编辑区域已经设置了2个空格缩进,但是回车换行还是4个空格。每次还要手动调整缩进真的很多余,有没有方法可以设置下。

比如

Text("Welcome")

换行后

Text(
    "Welcome")

再换行就是这样

Text(
    "Welcome",
  style: null,
)

手动格式化后会修正为2个缩进空格

Text(
  "Welcome",
  style: null,
)

image
image


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Preference - Editor - CodeStyle 找到你要修改的文件类型,然后 Tabs and Indents 中 把 Indent 和 Continuation Indent的值都改为 2 .你看下这个方案可行不


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...