From bc29439e5e78cb5f6abddbeb4db2ff186161e66f Mon Sep 17 00:00:00 2001 From: solid-glebvorobey <132369081+solid-glebvorobey@users.noreply.github.com> Date: Thu, 19 Sep 2024 23:49:51 +0200 Subject: [PATCH] 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 --- lib/src/lints/member_ordering/config_parser.dart | 4 ++-- lib/src/lints/member_ordering/member_ordering_utils.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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; }