You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A suggestion: The ideal solution would be not to disable the formating completely, but to let that IDE autoformat it in an acceptable way. I'm actually surprised that there is a format conflict here, doesn't VSCode with the flutter plugin just call dartfmt, and wouldn't dartfmts default be the best code style for this flutter project?
there are several recurring ways in which dartfmt tends to make the code harder to read than it would be if formatted better;
and at least for me, when using dartfmt / dart format, it hasn't felt to me like it means not thinking about formatting, more like doing different thinking about formatting.
The Flutter folks would like to use autoformatting too, and have had discussions for years with the Dart folks about making dartfmt work well for the Flutter style. I recently saw a mention that there might be progress happening on that, which would be great.
Activity
onli commentedon Jul 19, 2023
A suggestion: The ideal solution would be not to disable the formating completely, but to let that IDE autoformat it in an acceptable way. I'm actually surprised that there is a format conflict here, doesn't VSCode with the flutter plugin just call dartfmt, and wouldn't dartfmts default be the best code style for this flutter project?
gnprice commentedon Jul 19, 2023
Yeah. We don't use dartfmt, and instead use a style similar to what's in the Flutter repo itself:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#formatting
Our experience has been that
dart format, it hasn't felt to me like it means not thinking about formatting, more like doing different thinking about formatting.Discussion with more details here:
https://chat.zulip.org/#narrow/stream/48-mobile/topic/Dart.20formatting/near/1585603
There's also a bit further context in:
The Flutter folks would like to use autoformatting too, and have had discussions for years with the Dart folks about making dartfmt work well for the Flutter style. I recently saw a mention that there might be progress happening on that, which would be great.
vscode: Disable reformatting whole swaths of code
vscode: Disable reformatting whole swaths of code