Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated functions #180

Merged
merged 14 commits into from
Sep 19, 2024
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
Loading