Intellij IDEA custom dart format. How to make dot operator on the same line

170 Views Asked by At

I am trying to configure dart to let the operator . appear on the same line. I am not having any success on configuring it to do that. It currently looks like this

enter image description here

I would like colors.removeLast() and colors.length to be each on one line. So it should be like

do
{
  colors.removeLast();
}
while(colors.length > 0);

Any suggestions on how I can make that happen ? Which settings do i need to change ?

1

There are 1 best solutions below

0
Konstantin Annikov On

Increase line length. The function call is being placed on the new line as the line cannot be longer than 20 (or so) symbols. Increasing this value will prevent IntelliJ IDEA to find ways to fit the text. See the difference: dart code style