dart_style icon indicating copy to clipboard operation
dart_style copied to clipboard

Non-ideal formatting on x.y.foo(...)

Open floitschG opened this issue 8 years ago • 1 comments

We had the following lines:

Zone.current.scheduleMicrotask(
    Zone.current.bindCallback(callback, runGuarded: true));

They were changed to:

Zone.current
    .scheduleMicrotask(Zone.current.bindCallback(callback, runGuarded: true));

The original formatting feels more informative.

floitschG avatar Mar 16 '17 10:03 floitschG

Perhaps this could be an option https://github.com/dart-lang/dart_style/issues/731

escamoteur avatar Aug 30 '18 06:08 escamoteur

The forthcoming tall style gives you:

Zone.current.scheduleMicrotask(
  Zone.current.bindCallback(callback, runGuarded: true),
);

That's not the same as the original formatting, of course, because of the change to how argument lists split. But I think it looks pretty good and avoids splitting after .current.

munificent avatar Aug 02 '24 15:08 munificent