Skip to content

Commit cf0954a

Browse files
authored
Change firstWhereOrNull() to nonNulls.firstOrNull. (#1590)
1 parent dc13a2f commit cf0954a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/front_end/piece_factory.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,8 @@ mixin PieceFactory {
627627
// @meta
628628
// // Weird place for comment.
629629
// int f() {}
630-
var firstToken = modifiers.firstWhereOrNull((token) => token != null) ??
631-
returnType.firstNonCommentToken;
630+
var firstToken =
631+
modifiers.nonNulls.firstOrNull ?? returnType.firstNonCommentToken;
632632
var leadingComments = pieces.takeCommentsBefore(firstToken);
633633

634634
var returnTypePiece = pieces.build(() {

0 commit comments

Comments
 (0)