Skip to content

Commit bc29439

Browse files
author
solid-glebvorobey
authored
Replace deprecated functions (#180)
* Fixed analyzer issue, fixed linter * Fixed LintCode issue * Fixed LintCode issue * Fixed pubspec * Try to update analyzer version * Try to override analyzer dependency * Add import as instead of hide * Fixed tests fpr custom linter to work correctly * Fixed issue with LintCode in docs * Fix description for rules * Replace deprecated functions
1 parent bf84eec commit bc29439

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/src/lints/member_ordering/config_parser.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class MemberOrderingConfigParser {
7171
? List<String>.from(orderConfig)
7272
: _defaultOrderList;
7373

74-
return order.map(_parseGroup).whereNotNull().toList();
74+
return order.map(_parseGroup).nonNulls.toList();
7575
}
7676

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

83-
return widgetsOrder.map(_parseGroup).whereNotNull().toList();
83+
return widgetsOrder.map(_parseGroup).nonNulls.toList();
8484
}
8585

8686
static MemberGroup? _parseGroup(String group) {

lib/src/lints/member_ordering/member_ordering_utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'package:solid_lints/src/lints/member_ordering/models/modifier.dart';
77
Annotation? parseAnnotation(AnnotatedNode node) {
88
return node.metadata
99
.map((metadata) => Annotation.parse(metadata.name.name))
10-
.whereNotNull()
10+
.nonNulls
1111
.firstOrNull;
1212
}
1313

0 commit comments

Comments
 (0)