Skip to content

Commit

Permalink
Change firstWhereOrNull() to nonNulls.firstOrNull. (#1590)
Browse files Browse the repository at this point in the history
  • Loading branch information
munificent authored Oct 31, 2024
1 parent dc13a2f commit cf0954a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/front_end/piece_factory.dart
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,8 @@ mixin PieceFactory {
// @meta
// // Weird place for comment.
// int f() {}
var firstToken = modifiers.firstWhereOrNull((token) => token != null) ??
returnType.firstNonCommentToken;
var firstToken =
modifiers.nonNulls.firstOrNull ?? returnType.firstNonCommentToken;
var leadingComments = pieces.takeCommentsBefore(firstToken);

var returnTypePiece = pieces.build(() {
Expand Down

0 comments on commit cf0954a

Please sign in to comment.