diff --git a/lib/src/lints/member_ordering/config_parser.dart b/lib/src/lints/member_ordering/config_parser.dart index ee641de..2d847d7 100644 --- a/lib/src/lints/member_ordering/config_parser.dart +++ b/lib/src/lints/member_ordering/config_parser.dart @@ -71,7 +71,7 @@ class MemberOrderingConfigParser { ? List.from(orderConfig) : _defaultOrderList; - return order.map(_parseGroup).whereNotNull().toList(); + return order.map(_parseGroup).nonNulls.toList(); } /// Parse rule config for widget class order rules @@ -80,7 +80,7 @@ class MemberOrderingConfigParser { ? List.from(widgetsOrderConfig) : _defaultWidgetsOrderList; - return widgetsOrder.map(_parseGroup).whereNotNull().toList(); + return widgetsOrder.map(_parseGroup).nonNulls.toList(); } static MemberGroup? _parseGroup(String group) { diff --git a/lib/src/lints/member_ordering/member_ordering_utils.dart b/lib/src/lints/member_ordering/member_ordering_utils.dart index fb0fef2..870a237 100644 --- a/lib/src/lints/member_ordering/member_ordering_utils.dart +++ b/lib/src/lints/member_ordering/member_ordering_utils.dart @@ -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; }