Skip to content

Commit

Permalink
Replace deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
solid-glebvorobey committed Sep 19, 2024
1 parent 221ed9e commit 10f8281
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/src/lints/member_ordering/config_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class MemberOrderingConfigParser {
? List<String>.from(orderConfig)
: _defaultOrderList;

return order.map(_parseGroup).whereNotNull().toList();
return order.map(_parseGroup).nonNulls.toList();
}

/// Parse rule config for widget class order rules
Expand All @@ -80,7 +80,7 @@ class MemberOrderingConfigParser {
? List<String>.from(widgetsOrderConfig)
: _defaultWidgetsOrderList;

return widgetsOrder.map(_parseGroup).whereNotNull().toList();
return widgetsOrder.map(_parseGroup).nonNulls.toList();
}

static MemberGroup? _parseGroup(String group) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/lints/member_ordering/member_ordering_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:solid_lints/src/lints/member_ordering/models/modifier.dart';
Annotation? parseAnnotation(AnnotatedNode node) {
return node.metadata
.map((metadata) => Annotation.parse(metadata.name.name))
.whereNotNull()
.nonNulls
.firstOrNull;
}

Expand Down

0 comments on commit 10f8281

Please sign in to comment.