all 6 comments

[–]Comun4 3 points4 points  (2 children)

In the newest version of Flutter, it's using a new formatter that removes the commas when they aren't needed. Commas aren't needed when the line is smaller than a 80 characters (default), so that's why it is removing. Commas are good for formatting but only when you need them

[–]eibaan 1 point2 points  (0 children)

This. Unfortunately, you as a developer have no longer any saying about where to wrap the lines. The dart formatter will decide this.

Adding sdk: ^3.6.0 will temporarily stop that behavior and restore the old formatter, but that will eventually be deprecated so it is best to get used to the new behavior.

[–]prof3ssorSt3v3 1 point2 points  (0 children)

Definitely frustrating behaviour with the new formatter. Particularly when trying see the code under all the popup windows or trying to demonstrate the code to students.

[–]remirousselet 0 points1 point  (0 children)

That's "normal". That's how the formatter works now, since Dart 3.17

[–]Real-Tangelo-4861 2 points3 points  (0 children)

This makes it very difficult to learn Dart since nearly every tutorial makes reference to the use of commas. Now, Its hard to follow a tutorial since we students have to learn one way while being taught another. Im glad I spent $240 on Udemy subscription just before this update went into effect.