| Index: lib/src/argument_list_visitor.dart
|
| diff --git a/lib/src/argument_list_visitor.dart b/lib/src/argument_list_visitor.dart
|
| index 5c8bc0356104022d2d0e394d18c9e7e348e330b8..3ffa4c0479b88a28bfd6e36c31d8cfcf02a57a1c 100644
|
| --- a/lib/src/argument_list_visitor.dart
|
| +++ b/lib/src/argument_list_visitor.dart
|
| @@ -68,6 +68,31 @@ class ArgumentListVisitor {
|
| }
|
| }
|
|
|
| + // Edge case: If all of the arguments are named, but they aren't all
|
| + // functions, then don't handle the functions specially. A function with a
|
| + // bunch of named arguments tends to look best when they are all lined up,
|
| + // even the function ones (unless they are all functions).
|
| + //
|
| + // Prefers:
|
| + //
|
| + // function(
|
| + // named: () {
|
| + // something();
|
| + // },
|
| + // another: argument);
|
| + //
|
| + // Over:
|
| + //
|
| + // function(named: () {
|
| + // something();
|
| + // }
|
| + // another: argument);
|
| + if (functionsStart != null &&
|
| + node.arguments[0] is NamedExpression &&
|
| + (functionsStart > 0 || functionsEnd < node.arguments.length)) {
|
| + functionsStart = null;
|
| + }
|
| +
|
| if (functionsStart == null) {
|
| // No functions, so there is just a single argument list.
|
| return new ArgumentListVisitor._(visitor, node,
|
|
|