diff --git a/lib/src/ast_extensions.dart b/lib/src/ast_extensions.dart
index 32280d4..ac54ed8 100644
--- a/lib/src/ast_extensions.dart
+++ b/lib/src/ast_extensions.dart
@@ -7,6 +7,16 @@
 import 'piece/list.dart';
 
 extension AstNodeExtensions on AstNode {
+  /// When this node is in an argument list, what kind of block formatting
+  /// category it belongs to.
+  BlockFormat get blockFormatType => switch (this) {
+        AdjacentStrings(indentStrings: true) =>
+          BlockFormat.indentedAdjacentStrings,
+        AdjacentStrings() => BlockFormat.unindentedAdjacentStrings,
+        Expression(:var blockFormatType) => blockFormatType,
+        _ => BlockFormat.none,
+      };
+
   /// The first token at the beginning of this AST node, not including any
   /// tokens for leading doc comments.
   ///
diff --git a/lib/src/front_end/delimited_list_builder.dart b/lib/src/front_end/delimited_list_builder.dart
index 1a2fb7b..63d71e1 100644
--- a/lib/src/front_end/delimited_list_builder.dart
+++ b/lib/src/front_end/delimited_list_builder.dart
@@ -62,8 +62,6 @@
       });
     }
 
-    if (_style.allowBlockElement) _setBlockElementFormatting();
-
     var piece =
         ListPiece(_leftBracket, _elements, _blanksAfter, _rightBracket, _style);
     if (_mustSplit || forceSplit) piece.pin(State.split);
@@ -134,8 +132,8 @@
   /// [addCommentsBefore()] for the first token in the [piece].
   ///
   /// Assumes there is no comma after this piece.
-  void add(Piece piece, [BlockFormat format = BlockFormat.none]) {
-    _elements.add(ListElementPiece(_leadingComments, piece, format));
+  void add(Piece piece) {
+    _elements.add(ListElementPiece(_leadingComments, piece));
     _leadingComments.clear();
     _commentsBeforeComma = CommentSequence.empty;
   }
@@ -152,18 +150,8 @@
     // Handle comments between the preceding element and this one.
     addCommentsBefore(element.firstNonCommentToken);
 
-    // See if it's an expression that supports block formatting.
-    var format = switch (element) {
-      AdjacentStrings(indentStrings: true) =>
-        BlockFormat.indentedAdjacentStrings,
-      AdjacentStrings() => BlockFormat.unindentedAdjacentStrings,
-      Expression() => element.blockFormatType,
-      DartPattern() when element.canBlockSplit => BlockFormat.collection,
-      _ => BlockFormat.none,
-    };
-
     // Traverse the element itself.
-    add(_visitor.nodePiece(element), format);
+    add(_visitor.nodePiece(element));
 
     var nextToken = element.endToken.next!;
     if (nextToken.lexeme == ',') {
@@ -171,6 +159,24 @@
     }
   }
 
+  /// Visits a list of [elements].
+  ///
+  /// If [allowBlockArgument] is `true`, then allows one element to receive
+  /// block formatting if appropriate, as in:
+  ///
+  ///     function(argument, [
+  ///       block,
+  ///       like,
+  ///     ], argument);
+  void visitAll(List<AstNode> elements, {bool allowBlockArgument = false}) {
+    for (var i = 0; i < elements.length; i++) {
+      var element = elements[i];
+      visit(element);
+    }
+
+    if (allowBlockArgument) _setBlockArgument(elements);
+  }
+
   /// Inserts an inner left delimiter between two elements.
   ///
   /// This is used for parameter lists when there are both mandatory and
@@ -398,6 +404,14 @@
     );
   }
 
+  /// Given an argument list, determines which if any of the arguments should
+  /// get special block-like formatting as in the list literal in:
+  ///
+  ///     function(argument, [
+  ///       block,
+  ///       like,
+  ///     ], argument);
+  ///
   /// Looks at the [BlockFormat] types of all of the elements to determine if
   /// one of them should be block formatted.
   ///
@@ -426,85 +440,112 @@
   ///
   /// Stores the result of this calculation by setting flags on the
   /// [ListElement]s.
-  void _setBlockElementFormatting() {
-    // TODO(tall): These heuristics will probably need some iteration.
-    var functions = <int>[];
-    var collections = <int>[];
-    var adjacentStrings = <int>[];
+  void _setBlockArgument(List<AstNode> arguments) {
+    var candidateIndex = _candidateBlockArgument(arguments);
+    if (candidateIndex == -1) return;
 
-    for (var i = 0; i < _elements.length; i++) {
-      switch (_elements[i].blockFormat) {
-        case BlockFormat.function:
-          functions.add(i);
-        case BlockFormat.collection:
-          collections.add(i);
-        case BlockFormat.invocation:
-          // We don't allow function calls as block elements partially for style
-          // and partially for performance. It often doesn't look great to let
-          // nested function calls pack arbitrarily deeply as block arguments:
-          //
-          //     ScaffoldMessenger.of(context).showSnackBar(SnackBar(
-          //         content: Text(
-          //       localizations.demoSnackbarsAction,
-          //     )));
-          //
-          // This is better when expanded like:
-          //
-          //     ScaffoldMessenger.of(context).showSnackBar(
-          //       SnackBar(
-          //         content: Text(
-          //           localizations.demoSnackbarsAction,
-          //         ),
-          //       ),
-          //     );
-          //
-          // Also, when invocations can be block arguments, which themselves
-          // may contain block arguments, it's easy to run into combinatorial
-          // performance in the solver as it tries to determine which of the
-          // nested calls should and shouldn't be block formatted.
-          break;
-        case BlockFormat.indentedAdjacentStrings:
-        case BlockFormat.unindentedAdjacentStrings:
-          adjacentStrings.add(i);
-        case BlockFormat.none:
-          break; // Not a block element.
+    // Only allow up to one trailing argument after the block argument. This
+    // handles the common `tags` and `timeout` named arguments in `test()` and
+    // `group()` while still mostly having the block argument be at the end of
+    // the argument list.
+    if (candidateIndex < arguments.length - 2) return;
+
+    // If there are multiple named arguments, they should never end up on
+    // separate lines (unless the whole argument list fully splits). Otherwise,
+    // it's too easy for an argument name to get buried in the middle of a line.
+    // So we look for named arguments before, on, and after the candidate
+    // argument. If more than one of those sections of arguments has a named
+    // argument, then we don't allow the block argument.
+    var namedSections = 0;
+    bool hasNamedArgument(int from, int to) {
+      for (var i = from; i < to; i++) {
+        if (arguments[i] is NamedExpression) return true;
       }
+
+      return false;
     }
 
-    switch ((functions, collections, adjacentStrings)) {
-      // Only allow block formatting in an argument list containing adjacent
-      // strings when:
-      //
-      // 1. The block argument is a function expression.
-      // 2. It is the second argument, following an adjacent strings expression.
-      // 3. There are no other adjacent strings in the argument list.
-      //
-      // This matches the `test()` and `group()` and other similar APIs where
-      // you have a message string followed by a block-like function expression
-      // but little else.
-      // TODO(tall): We may want to iterate on these heuristics. For now,
-      // starting with something very narrowly targeted.
-      case ([1], _, [0]):
+    if (hasNamedArgument(0, candidateIndex)) namedSections++;
+    if (hasNamedArgument(candidateIndex, candidateIndex + 1)) namedSections++;
+    if (hasNamedArgument(candidateIndex + 1, arguments.length)) namedSections++;
+
+    if (namedSections > 1) return;
+
+    // Edge case: If the first argument is adjacent strings and the second
+    // argument is a function literal, with optionally a third non-block
+    // argument, then treat the function as the block argument.
+    //
+    // This matches the `test()` and `group()` and other similar APIs where
+    // you have a message string followed by a block-like function expression
+    // but little else, as in:
+    //
+    //     test('Some long test description '
+    //         'that splits into multiple lines.', () {
+    //       expect(1 + 2, 3);
+    //     });
+    if (candidateIndex == 1 &&
+        arguments[0] is! NamedExpression &&
+        arguments[1] is! NamedExpression) {
+      if ((arguments[0].blockFormatType, arguments[1].blockFormatType)
+          case (
+            BlockFormat.unindentedAdjacentStrings ||
+                BlockFormat.indentedAdjacentStrings,
+            BlockFormat.function
+          )) {
         // The adjacent strings.
         _elements[0].allowNewlinesWhenUnsplit = true;
-        if (_elements[0].blockFormat == BlockFormat.unindentedAdjacentStrings) {
+        if (arguments[0].blockFormatType ==
+            BlockFormat.unindentedAdjacentStrings) {
           _elements[0].indentWhenBlockFormatted = true;
         }
 
         // The block-formattable function.
         _elements[1].allowNewlinesWhenUnsplit = true;
-
-      // A function expression takes precedence over other block arguments.
-      case ([var element], _, _):
-        _elements[element].allowNewlinesWhenUnsplit = true;
-
-      // A single collection literal can be block formatted even if there are
-      // other arguments.
-      case ([], [var element], _):
-        _elements[element].allowNewlinesWhenUnsplit = true;
+        return;
+      }
     }
 
-    // If we get here, there are no block element, or it's ambiguous as to
-    // which one should be it so none are.
+    // If we get here, we have a block argument.
+    _elements[candidateIndex].allowNewlinesWhenUnsplit = true;
+  }
+
+  /// If an argument in [arguments] is a candidate to be block formatted,
+  /// returns its index.
+  ///
+  /// Otherwise, returns `-1`.
+  int _candidateBlockArgument(List<AstNode> arguments) {
+    var functionIndex = -1;
+    var collectionIndex = -1;
+    // var stringIndex = -1;
+
+    for (var i = 0; i < arguments.length; i++) {
+      // See if it's an expression that supports block formatting.
+      switch (arguments[i].blockFormatType) {
+        case BlockFormat.function:
+          if (functionIndex >= 0) {
+            functionIndex = -2;
+          } else {
+            functionIndex = i;
+          }
+
+        case BlockFormat.collection:
+          if (collectionIndex >= 0) {
+            collectionIndex = -2;
+          } else {
+            collectionIndex = i;
+          }
+
+        case BlockFormat.invocation:
+        case BlockFormat.indentedAdjacentStrings:
+        case BlockFormat.unindentedAdjacentStrings:
+        case BlockFormat.none:
+          break; // Normal argument.
+      }
+    }
+
+    if (functionIndex >= 0) return functionIndex;
+    if (collectionIndex >= 0) return collectionIndex;
+
+    return -1;
   }
 }
diff --git a/lib/src/front_end/piece_factory.dart b/lib/src/front_end/piece_factory.dart
index cba03ac..3414351 100644
--- a/lib/src/front_end/piece_factory.dart
+++ b/lib/src/front_end/piece_factory.dart
@@ -123,7 +123,7 @@
         leftBracket: leftBracket,
         elements,
         rightBracket: rightBracket,
-        style: const ListStyle(allowBlockElement: true));
+        allowBlockArgument: true);
   }
 
   /// Writes a bracket-delimited block or declaration body.
@@ -972,7 +972,8 @@
       {required Token leftBracket,
       required Token rightBracket,
       ListStyle style = const ListStyle(),
-      bool preserveNewlines = false}) {
+      bool preserveNewlines = false,
+      bool allowBlockArgument = false}) {
     // If the list is completely empty, write the brackets directly inline so
     // that we create fewer pieces.
     if (!elements.canSplit(rightBracket)) {
@@ -988,7 +989,7 @@
     if (preserveNewlines && elements.containsLineComments(rightBracket)) {
       _preserveNewlinesInCollection(elements, builder);
     } else {
-      elements.forEach(builder.visit);
+      builder.visitAll(elements, allowBlockArgument: allowBlockArgument);
     }
 
     builder.rightBracket(rightBracket);
diff --git a/lib/src/piece/list.dart b/lib/src/piece/list.dart
index 0ebd7b3..3eb36cc 100644
--- a/lib/src/piece/list.dart
+++ b/lib/src/piece/list.dart
@@ -252,9 +252,6 @@
 
   final Piece? _content;
 
-  /// What kind of block formatting can be applied to this element.
-  final BlockFormat blockFormat;
-
   /// Whether newlines are allowed in this element when this list is unsplit.
   ///
   /// This is generally only true for a single "block" element, as in:
@@ -312,16 +309,13 @@
   /// delimiter (here `,` and 2).
   int _commentsBeforeDelimiter = 0;
 
-  ListElementPiece(
-      List<Piece> leadingComments, Piece element, BlockFormat format)
+  ListElementPiece(List<Piece> leadingComments, Piece element)
       : _leadingComments = [...leadingComments],
-        _content = element,
-        blockFormat = format;
+        _content = element;
 
   ListElementPiece.comment(Piece comment)
       : _leadingComments = const [],
-        _content = null,
-        blockFormat = BlockFormat.none {
+        _content = null {
     _hangingComments.add(comment);
   }
 
@@ -404,9 +398,10 @@
   /// elements.
   function,
 
-  /// The element is a collection literal.
+  /// The element is a collection literal or multiline string literal.
   ///
-  /// These can be block formatted even when there are other arguments.
+  /// If there is only one of these and no [BlockFormat.function] elements, then
+  /// it can be block formatted.
   collection,
 
   /// A function or method invocation.
@@ -416,7 +411,7 @@
 
   /// The element is an adjacent strings expression that's in an list that
   /// requires its subsequent lines to be indented (because there are other
-  /// string literal in the list).
+  /// string literals in the list).
   indentedAdjacentStrings,
 
   /// The element is an adjacent strings expression that's in an list that
@@ -459,18 +454,8 @@
   ///     //              ^                      ^
   final bool spaceWhenUnsplit;
 
-  /// Whether an element in the list is allowed to have block-like formatting,
-  /// as in:
-  ///
-  ///     function(argument, [
-  ///       block,
-  ///       like,
-  ///     ], argument);
-  final bool allowBlockElement;
-
   const ListStyle(
       {this.commas = Commas.trailing,
       this.splitCost = Cost.normal,
-      this.spaceWhenUnsplit = false,
-      this.allowBlockElement = false});
+      this.spaceWhenUnsplit = false});
 }
diff --git a/test/tall/invocation/block_argument_description.stmt b/test/tall/invocation/block_argument_description.stmt
new file mode 100644
index 0000000..2ea8e9e
--- /dev/null
+++ b/test/tall/invocation/block_argument_description.stmt
@@ -0,0 +1,104 @@
+40 columns                              |
+### Test how block formatting functions like test(), group(), that start with
+### leading adjacent strings behaves.
+>>> Adjacent strings preceding a function expression doesn't prevent block formatting.
+test('First adjacent string' 'second adjacent string'
+'third adjacent string', () async {
+  ;
+});
+<<<
+test('First adjacent string'
+    'second adjacent string'
+    'third adjacent string', () async {
+  ;
+});
+>>> Don't block format a function with a preceding adjacent string if it doesn't fit.
+test('First adjacent string' 'second long adjacent string', () async {
+  ;
+});
+<<<
+test(
+  'First adjacent string'
+  'second long adjacent string',
+  () async {
+    ;
+  },
+);
+>>> Don't block format adjacent strings preceding a non-function block argument.
+test('First adjacent string'
+    'second adjacent string'
+    'third adjacent string', [
+  element1,
+  element2,
+  element3,
+  element4,
+]);
+<<<
+test(
+  'First adjacent string'
+  'second adjacent string'
+  'third adjacent string',
+  [
+    element1,
+    element2,
+    element3,
+    element4,
+  ],
+);
+>>> Another string argument doesn't prevent block formatting.
+test('First string line 1' 'first string line 2', () {
+  ;
+}, 'Another simple string');
+<<<
+test('First string line 1'
+    'first string line 2', () {
+  ;
+}, 'Another simple string');
+>>> Multiple trailing arguments prevent block formatting.
+test('First string line 1' 'first string line 2', () {
+  ;
+}, trailing, another);
+<<<
+test(
+  'First string line 1'
+  'first string line 2',
+  () {
+    ;
+  },
+  trailing,
+  another,
+);
+>>> Don't block format if the leading string is named.
+test(named: 'First string line 1' 'first string line 2', () {
+  ;
+});
+<<<
+test(
+  named:
+      'First string line 1'
+      'first string line 2',
+  () {
+    ;
+  },
+);
+>>> Don't block format if the leading function is named.
+test('First string line 1' 'first string line 2', named: () {
+  ;
+});
+<<<
+test(
+  'First string line 1'
+  'first string line 2',
+  named: () {
+    ;
+  },
+);
+>>> Allow block formatting when the trailing argument is named.
+test('First string line 1' 'first string line 2', () {
+  ;
+}, named: arg);
+<<<
+test('First string line 1'
+    'first string line 2', () {
+  ;
+}, named: arg);
\ No newline at end of file
diff --git a/test/tall/invocation/block_argument_multiple.stmt b/test/tall/invocation/block_argument_multiple.stmt
index 85b6418..893b019 100644
--- a/test/tall/invocation/block_argument_multiple.stmt
+++ b/test/tall/invocation/block_argument_multiple.stmt
@@ -150,7 +150,7 @@
 function(switch (a) {}, switch (b) {
   1 => 2,
 }, switch (c) {});
->>> Collection and multi-line string prevents block formatting.
+>>> Collection and multiline string prevents block formatting.
 function([element, element], '''multiple
 lines''');
 <<<
@@ -158,71 +158,4 @@
   [element, element],
   '''multiple
 lines''',
-);
->>> Adjacent strings preceding a function expression doesn't prevent block formatting.
-test('First adjacent string' 'second adjacent string'
-'third adjacent string', () async {
-  ;
-});
-<<<
-test('First adjacent string'
-    'second adjacent string'
-    'third adjacent string', () async {
-  ;
-});
->>> Don't block format a function with a preceding adjacent string if it doesn't fit.
-test('First adjacent string' 'second long adjacent string', () async {
-  ;
-});
-<<<
-test(
-  'First adjacent string'
-  'second long adjacent string',
-  () async {
-    ;
-  },
-);
->>> Don't block format adjacent strings preceding a non-function block argument.
-test('First adjacent string'
-    'second adjacent string'
-    'third adjacent string', [
-  element1,
-  element2,
-  element3,
-  element4,
-]);
-<<<
-test(
-  'First adjacent string'
-  'second adjacent string'
-  'third adjacent string',
-  [
-    element1,
-    element2,
-    element3,
-    element4,
-  ],
-);
->>> Other string arguments don't prevent block formatting.
-test('First string line 1' 'first string line 2', () {
-  ;
-}, 'Another simple string');
-<<<
-test('First string line 1'
-    'first string line 2', () {
-  ;
-}, 'Another simple string');
->>> Other adjacent string arguments prevent block formatting.
-test('First string line 1' 'first string line 2', () {
-  ;
-}, 'Another adjacent' 'string argument');
-<<<
-test(
-  'First string line 1'
-      'first string line 2',
-  () {
-    ;
-  },
-  'Another adjacent'
-      'string argument',
 );
\ No newline at end of file
diff --git a/test/tall/invocation/block_argument_named.stmt b/test/tall/invocation/block_argument_named.stmt
new file mode 100644
index 0000000..ff7cbf3
--- /dev/null
+++ b/test/tall/invocation/block_argument_named.stmt
@@ -0,0 +1,66 @@
+40 columns                              |
+### Test how named arguments interact with block formatting.
+>>> Block format all positional.
+function(be, fore, [element, element], after);
+<<<
+function(be, fore, [
+  element,
+  element,
+], after);
+>>> Block format named only leading.
+function(a: be, b: fore, [element, element], after);
+<<<
+function(a: be, b: fore, [
+  element,
+  element,
+], after);
+>>> Block format named only block argument.
+function(be, fore, a: [element, element], after);
+<<<
+function(be, fore, a: [
+  element,
+  element,
+], after);
+>>> Block format named only trailing.
+function(be, fore, [element, element], a: after);
+<<<
+function(be, fore, [
+  element,
+  element,
+], a: after);
+>>> Don't block format named leading and block argument.
+function(a: be, fore, b: [element, element], after);
+<<<
+function(
+  a: be,
+  fore,
+  b: [element, element],
+  after,
+);
+>>> Don't block format named leading and trailing.
+function(a: be, fore, [element, element], b: after);
+<<<
+function(
+  a: be,
+  fore,
+  [element, element],
+  b: after,
+);
+>>> Don't block format named block argument and trailing.
+function(be, fore, a: [element, element], b: after);
+<<<
+function(
+  be,
+  fore,
+  a: [element, element],
+  b: after,
+);
+>>> Don't block format all named.
+function(a: be, b: fore, c: [element, element], d: after);
+<<<
+function(
+  a: be,
+  b: fore,
+  c: [element, element],
+  d: after,
+);
\ No newline at end of file
diff --git a/test/tall/invocation/block_argument_other.stmt b/test/tall/invocation/block_argument_other.stmt
index a1d880b..9aa7bec 100644
--- a/test/tall/invocation/block_argument_other.stmt
+++ b/test/tall/invocation/block_argument_other.stmt
@@ -63,4 +63,12 @@
     element,
     element,
   ],
+);
+>>> Multiple trailing arguments prevent block formatting.
+function([element, element, element], trailing, argument);
+<<<
+function(
+  [element, element, element],
+  trailing,
+  argument,
 );
\ No newline at end of file
diff --git a/test/tall/invocation/block_argument_string.stmt b/test/tall/invocation/block_argument_string.stmt
index b3cb30e..d594c0b 100644
--- a/test/tall/invocation/block_argument_string.stmt
+++ b/test/tall/invocation/block_argument_string.stmt
@@ -1,6 +1,6 @@
 40 columns                              |
-### Test multi-line strings as block arguments.
->>> Allow block formatting a multi-line string.
+### Test multiline strings as block arguments.
+>>> Allow block formatting a multiline string.
 someMethod("""first line fits in here
 more stuff down here too that is long
 """);
@@ -16,7 +16,7 @@
 someMethod('''first line fits in here
 more stuff down here too that is long
 ''');
->>> Allow block formatting a multi-line string with interpolation.
+>>> Allow block formatting a multiline string with interpolation.
 someMethod("""first line fits in here
 more stuff $down here too that is long
 """);
@@ -40,7 +40,7 @@
   """first line does not fit here
 """,
 );
->>> Block format multi-line string with non-block arguments before.
+>>> Block format multiline string with non-block arguments before.
 someMethod("foo", "bar", """
 some
 text
@@ -50,17 +50,31 @@
 some
 text
 """);
->>> Block format multi-line string with non-block arguments after.
+>>> Block format multiline string with one argument after.
+someMethod("""
+some
+text
+""", "foo");
+<<<
+someMethod("""
+some
+text
+""", "foo");
+>>> Don't block format multiline string with multiple arguments after.
 someMethod("""
 some
 text
 """, "foo", "bar");
 <<<
-someMethod("""
+someMethod(
+  """
 some
 text
-""", "foo", "bar");
->>> Block format multi-line string with non-block arguments before and after.
+""",
+  "foo",
+  "bar",
+);
+>>> Block format multiline string with non-block arguments before and after.
 someMethod("foo", """
 some
 text
@@ -71,7 +85,7 @@
 some
 text
 """, "bar");
->>> Can't have multiple block formatted multi-line strings.
+>>> Can't have multiple block formatted multiline strings.
 someMethod("""
 some
 text
diff --git a/test/tall/regression/0100/0146.unit b/test/tall/regression/0100/0146.unit
index a16c397..eab225d 100644
--- a/test/tall/regression/0100/0146.unit
+++ b/test/tall/regression/0100/0146.unit
@@ -3,18 +3,13 @@
   foo([1, 2, 4, 5, 6, 7, 8, 20], argument, argument, argument, argument, argument);
 }
 <<<
-### TODO(rnystrom): This would look better with the list unsplit and the
-### argument list split. Should we take the number of elements into account
-### when deciding whether or not to do a block argument?
 main() {
-  foo([
-    1,
-    2,
-    4,
-    5,
-    6,
-    7,
-    8,
-    20,
-  ], argument, argument, argument, argument, argument);
+  foo(
+    [1, 2, 4, 5, 6, 7, 8, 20],
+    argument,
+    argument,
+    argument,
+    argument,
+    argument,
+  );
 }
\ No newline at end of file
diff --git a/test/tall/regression/0200/0243.stmt b/test/tall/regression/0200/0243.stmt
index ddf06f8..a72864a 100644
--- a/test/tall/regression/0200/0243.stmt
+++ b/test/tall/regression/0200/0243.stmt
@@ -7,13 +7,16 @@
               style: _content_style,
               children: appChildren)]);
 <<<
-    return new Container(key: 'ChatApp', children: [
-      new Container(
-        key: 'Content',
-        style: _content_style,
-        children: appChildren,
-      ),
-    ]);
+    return new Container(
+      key: 'ChatApp',
+      children: [
+        new Container(
+          key: 'Content',
+          style: _content_style,
+          children: appChildren,
+        ),
+      ],
+    );
 >>> (indent 10)
           return new Container(
               key: 'ChatApp',
@@ -23,10 +26,13 @@
                     style: _content_style,
                     children: appChildren)]);
 <<<
-          return new Container(key: 'ChatApp', children: [
-            new Container(
-              key: 'Content',
-              style: _content_style,
-              children: appChildren,
-            ),
-          ]);
\ No newline at end of file
+          return new Container(
+            key: 'ChatApp',
+            children: [
+              new Container(
+                key: 'Content',
+                style: _content_style,
+                children: appChildren,
+              ),
+            ],
+          );
\ No newline at end of file
diff --git a/test/tall/regression/0300/0394.stmt b/test/tall/regression/0300/0394.stmt
index 4b5a0f9..240096a 100644
--- a/test/tall/regression/0300/0394.stmt
+++ b/test/tall/regression/0300/0394.stmt
@@ -15,13 +15,24 @@
 ]);
 <<<
 return $.Div(inner: [
-  $.Div(id: "container", inner: [
-    $.Canvas(width: maxD, height: maxD, clazz: "center", ref: canvas),
-    $.Form(clazz: "center", inner: [
-      $.Input(type: "range", max: 1000, value: seeds, onChange: onSliderChange),
-    ]),
-    $.Img(src: "math.png", width: "350px", height: "42px", clazz: "center"),
-  ]),
+  $.Div(
+    id: "container",
+    inner: [
+      $.Canvas(width: maxD, height: maxD, clazz: "center", ref: canvas),
+      $.Form(
+        clazz: "center",
+        inner: [
+          $.Input(
+            type: "range",
+            max: 1000,
+            value: seeds,
+            onChange: onSliderChange,
+          ),
+        ],
+      ),
+      $.Img(src: "math.png", width: "350px", height: "42px", clazz: "center"),
+    ],
+  ),
 
   $.Footer(inner: [$.P(id: "notes", inner: "${seeds} seeds")]),
 ]);
\ No newline at end of file
diff --git a/test/tall/regression/0400/0421.unit b/test/tall/regression/0400/0421.unit
index d54ca7a..f1e4d09 100644
--- a/test/tall/regression/0400/0421.unit
+++ b/test/tall/regression/0400/0421.unit
@@ -10,13 +10,16 @@
   var a = [[[1]]];
 }
 <<<
-@Component(selector: 'my-selector', properties: const [
-  'property-1',
-  'property-2',
-  'property-3',
-  'property-4',
-  'property-5',
-])
+@Component(
+  selector: 'my-selector',
+  properties: const [
+    'property-1',
+    'property-2',
+    'property-3',
+    'property-4',
+    'property-5',
+  ],
+)
 @View(
   directives: const [
     OtherComponent1,
@@ -52,13 +55,16 @@
   var a = [[[1]]];
 }
 <<<
-@Component(selector: 'my-selector', properties: const [
-  'property-1',
-  'property-2',
-  'property-3',
-  'property-4',
-  'property-5',
-])
+@Component(
+  selector: 'my-selector',
+  properties: const [
+    'property-1',
+    'property-2',
+    'property-3',
+    'property-4',
+    'property-5',
+  ],
+)
 @View(
   directives: const [
     OtherComponent1,
diff --git a/test/tall/regression/0400/0478.stmt b/test/tall/regression/0400/0478.stmt
index d2ab92c..c95fc16 100644
--- a/test/tall/regression/0400/0478.stmt
+++ b/test/tall/regression/0400/0478.stmt
@@ -38,9 +38,12 @@
         }));
 <<<
         statusBarWidgets.add(
-          new IconButton(icon: "action/swap_vert", onPressed: () {
-            setState(() {
-              _showSplitView = !_showSplitView;
-            });
-          }),
+          new IconButton(
+            icon: "action/swap_vert",
+            onPressed: () {
+              setState(() {
+                _showSplitView = !_showSplitView;
+              });
+            },
+          ),
         );
\ No newline at end of file
diff --git a/test/tall/regression/0500/0568.unit b/test/tall/regression/0500/0568.unit
index 31658c4..c392e10 100644
--- a/test/tall/regression/0500/0568.unit
+++ b/test/tall/regression/0500/0568.unit
@@ -6,7 +6,10 @@
 }
 <<<
 void main() {
-  var controller = new StreamController<T>(sync: true, onCancel: () {
-    return Future.wait(operationSet.map((operation) => operation.cancel()));
-  });
+  var controller = new StreamController<T>(
+    sync: true,
+    onCancel: () {
+      return Future.wait(operationSet.map((operation) => operation.cancel()));
+    },
+  );
 }
\ No newline at end of file
diff --git a/test/tall/regression/0800/0809.unit b/test/tall/regression/0800/0809.unit
index 2c6fb55..6d5fda2 100644
--- a/test/tall/regression/0800/0809.unit
+++ b/test/tall/regression/0800/0809.unit
@@ -44,19 +44,23 @@
     );
   }
 
-  Widget buildRow() =>
-      Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
-        Image.asset('images/pic1.jpg'),
-        Image.asset('images/pic2.jpg'),
-        Image.asset('images/pic3.jpg'),
-      ]);
+  Widget buildRow() => Row(
+    mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+    children: [
+      Image.asset('images/pic1.jpg'),
+      Image.asset('images/pic2.jpg'),
+      Image.asset('images/pic3.jpg'),
+    ],
+  );
 
-  Widget buildColumn() =>
-      Column(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
-        Image.asset('images/pic1.jpg'),
-        Image.asset('images/pic2.jpg'),
-        Image.asset('images/pic3.jpg'),
-      ]);
+  Widget buildColumn() => Column(
+    mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+    children: [
+      Image.asset('images/pic1.jpg'),
+      Image.asset('images/pic2.jpg'),
+      Image.asset('images/pic3.jpg'),
+    ],
+  );
 }
 >>>
 class MyApp extends StatelessWidget {
diff --git a/test/tall/regression/1400/1441.unit b/test/tall/regression/1400/1441.unit
index 9d6b720..931b89d 100644
--- a/test/tall/regression/1400/1441.unit
+++ b/test/tall/regression/1400/1441.unit
@@ -32,9 +32,10 @@
   @override
   Widget build(BuildContext context) {
     return Center(
-      child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
-        const Text('你好'),
-      ]),
+      child: Row(
+        mainAxisAlignment: MainAxisAlignment.center,
+        children: [const Text('你好')],
+      ),
     );
   }
 }
\ No newline at end of file
diff --git a/test/tall/regression/1500/1526.stmt b/test/tall/regression/1500/1526.stmt
index b313303..2289cf7 100644
--- a/test/tall/regression/1500/1526.stmt
+++ b/test/tall/regression/1500/1526.stmt
@@ -30,10 +30,13 @@
             'nameStartsWith': cleanNameFilter,
         }, cancelToken: cancelToken);
 <<<
-    final response = await _get('characters', queryParameters:
-        <String, Object?>{
-          'offset': offset,
-          if (limit != null) 'limit': limit,
-          if (cleanNameFilter != null && cleanNameFilter.isNotEmpty)
-            'nameStartsWith': cleanNameFilter,
-        }, cancelToken: cancelToken);
\ No newline at end of file
+    final response = await _get(
+      'characters',
+      queryParameters: <String, Object?>{
+        'offset': offset,
+        if (limit != null) 'limit': limit,
+        if (cleanNameFilter != null && cleanNameFilter.isNotEmpty)
+          'nameStartsWith': cleanNameFilter,
+      },
+      cancelToken: cancelToken,
+    );
\ No newline at end of file
diff --git a/test/tall/regression/1500/1527.unit b/test/tall/regression/1500/1527.unit
new file mode 100644
index 0000000..2404004
--- /dev/null
+++ b/test/tall/regression/1500/1527.unit
@@ -0,0 +1,114 @@
+>>>
+class C {
+  Result<Res> chain<Res>(Res Function(T value) cb) {
+    return when(data: (value) {
+      try {
+        return Result.data(cb(value));
+      } catch (err, stack) {
+        return Result.error(err, stack);
+      }
+    }, error: Result.error);
+  }
+
+  T get dataOrThrow {
+    return when(data: (value) => value, error: (err, stack) {
+      // ignore: only_throw_errors
+      throw err;
+    });
+  }
+}
+<<<
+class C {
+  Result<Res> chain<Res>(Res Function(T value) cb) {
+    return when(
+      data: (value) {
+        try {
+          return Result.data(cb(value));
+        } catch (err, stack) {
+          return Result.error(err, stack);
+        }
+      },
+      error: Result.error,
+    );
+  }
+
+  T get dataOrThrow {
+    return when(
+      data: (value) => value,
+      error: (err, stack) {
+        // ignore: only_throw_errors
+        throw err;
+      },
+    );
+  }
+}
+>>>
+main() {
+  test(
+    'Test stuff',
+    () {
+      // Oof, too much indentation...
+      expect(stuff, otherStuff);
+    },
+    tags: ['hi'],
+  );
+}
+<<<
+main() {
+  test('Test stuff', () {
+    // Oof, too much indentation...
+    expect(stuff, otherStuff);
+  }, tags: ['hi']);
+}
+>>> (indent 2)
+  main() {
+    return Scaffold(
+      body: Center(child: AnimatedDigit(value: value % 10)),
+      floatingActionButton: FloatingActionButton(onPressed: () {
+        setState(() {
+          value += 1;
+        });
+      }, tooltip: 'Increment Digit', child: const Icon(Icons.add)),
+    );
+  }
+<<<
+  main() {
+    return Scaffold(
+      body: Center(child: AnimatedDigit(value: value % 10)),
+      floatingActionButton: FloatingActionButton(
+        onPressed: () {
+          setState(() {
+            value += 1;
+          });
+        },
+        tooltip: 'Increment Digit',
+        child: const Icon(Icons.add),
+      ),
+    );
+  }
+>>>
+final CatmullRomSpline path = CatmullRomSpline(const <Offset>[
+  Offset(0.05, 0.75),
+  Offset(0.18, 0.23),
+  Offset(0.32, 0.04),
+  Offset(0.73, 0.5),
+  Offset(0.42, 0.74),
+  Offset(0.73, 0.01),
+  Offset(0.93, 0.93),
+  Offset(0.05, 0.75),
+], startHandle: const Offset(0.93, 0.93), endHandle: const Offset(0.18, 0.23));
+<<<
+final CatmullRomSpline path = CatmullRomSpline(
+  const <Offset>[
+    Offset(0.05, 0.75),
+    Offset(0.18, 0.23),
+    Offset(0.32, 0.04),
+    Offset(0.73, 0.5),
+    Offset(0.42, 0.74),
+    Offset(0.73, 0.01),
+    Offset(0.93, 0.93),
+    Offset(0.05, 0.75),
+  ],
+  startHandle: const Offset(0.93, 0.93),
+  endHandle: const Offset(0.18, 0.23),
+);
\ No newline at end of file
diff --git a/test/tall/regression/1500/1528.stmt b/test/tall/regression/1500/1528.stmt
new file mode 100644
index 0000000..9306c5c
--- /dev/null
+++ b/test/tall/regression/1500/1528.stmt
@@ -0,0 +1,9 @@
+>>> (indent 10)
+          result = ProviderScope(overrides: [
+            selectedCharacterId.overrideWithValue(split.last),
+          ], child: const CharacterView());
+<<<
+          result = ProviderScope(
+            overrides: [selectedCharacterId.overrideWithValue(split.last)],
+            child: const CharacterView(),
+          );
\ No newline at end of file
diff --git a/test/tall/regression/1500/1531.stmt b/test/tall/regression/1500/1531.stmt
index 44cd473..9d321b6 100644
--- a/test/tall/regression/1500/1531.stmt
+++ b/test/tall/regression/1500/1531.stmt
@@ -15,18 +15,23 @@
           HttpHeaders.contentTypeHeader: ContentType.json.value,
         }, body: json.encode(discordPayload));
 <<<
-    final response = await post(Uri.parse(webhookUrl), headers: {
-      HttpHeaders.contentTypeHeader: ContentType.json.value,
-    }, body: json.encode(discordPayload));
+    final response = await post(
+      Uri.parse(webhookUrl),
+      headers: {HttpHeaders.contentTypeHeader: ContentType.json.value},
+      body: json.encode(discordPayload),
+    );
 >>> (indent 2)
   final token =
       await jwt.verify('<TOKEN>', issuer: '<ISSUER>', audience: {
         '<AUDIENCE>',
       }, publicKeysUrl: '<PUBLIC_KEYS_URL>');
 <<<
-  final token = await jwt.verify('<TOKEN>', issuer: '<ISSUER>', audience: {
-    '<AUDIENCE>',
-  }, publicKeysUrl: '<PUBLIC_KEYS_URL>');
+  final token = await jwt.verify(
+    '<TOKEN>',
+    issuer: '<ISSUER>',
+    audience: {'<AUDIENCE>'},
+    publicKeysUrl: '<PUBLIC_KEYS_URL>',
+  );
 >>> (indent 6)
       final connection =
           await connectSocket(
diff --git a/test/tall/regression/1500/1543.unit b/test/tall/regression/1500/1543.unit
new file mode 100644
index 0000000..71d625a
--- /dev/null
+++ b/test/tall/regression/1500/1543.unit
@@ -0,0 +1,15 @@
+>>>
+void main() async {
+  fn(param1: true, paraaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaam2: [
+    ['value'],
+  ]);
+}
+<<<
+void main() async {
+  fn(
+    param1: true,
+    paraaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaam2: [
+      ['value'],
+    ],
+  );
+}
\ No newline at end of file
