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
With an inline comment, the last two parameters here get put on the same line, which shouldn't be the case, since the last parameter has a trailing comma:
await_loadProfileView(
userId: profileView.userId,
setLikeActionType:LikeActionType.block,
// Remove star too from any user that is blocked
setStarAction:false, onUserActionChanged: widget.onUserActionChanged,
);
Removing the comment, the last two parameters get put on separate lines, as expected:
This is working as intended but I'm not sure at all if it's working as desired. When an argument list has a trailing comma, the formatter currently treats it exactly like a collection literal. Collection literals have some special logic where a comment inside the literal triggers a rule where it preserves the newlines and allows multiple elements/arguments on the same line.
That's probably not the most useful behavior for an argument list, though. We're working on a rewrite of the formatter (#1253) which will likely revisit this behavior. In the meantime, if you add a newline yourself between the last two arguments, it will preserve it.
await_loadProfileView(
userId: profileView.userId,
setLikeActionType:LikeActionType.block,
// Remove star too from any user that is blocked
setStarAction:false,
onUserActionChanged: widget.onUserActionChanged,
);
With an inline comment, the last two parameters here get put on the same line, which shouldn't be the case, since the last parameter has a trailing comma:
Removing the comment, the last two parameters get put on separate lines, as expected:
Dart version: 3.3.0-91.0.dev
The text was updated successfully, but these errors were encountered: