From 890e5e6492d35821a13f79d02b81074966b1ae89 Mon Sep 17 00:00:00 2001 From: Gustl22 Date: Sat, 3 Aug 2024 00:31:02 +0200 Subject: [PATCH] fix: Refactor whereNotNull to nonNulls --- .../lib/src/services/apis/germany_by.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wrestling_scoreboard_common/lib/src/services/apis/germany_by.dart b/wrestling_scoreboard_common/lib/src/services/apis/germany_by.dart index 70f859a7..23d771fb 100644 --- a/wrestling_scoreboard_common/lib/src/services/apis/germany_by.dart +++ b/wrestling_scoreboard_common/lib/src/services/apis/germany_by.dart @@ -161,7 +161,7 @@ class ByGermanyWrestlingApi extends WrestlingApi { organization: organization, ); }); - return clubs.whereNotNull().toSet(); + return clubs.nonNulls.toSet(); } @override @@ -182,7 +182,7 @@ class ByGermanyWrestlingApi extends WrestlingApi { final opponentMemberships = bouts.keys .where((bout) => bout.b?.participation.membership.club == club) .map((bout) => bout.b!.participation.membership); - return [...homeMemberships, ...opponentMemberships].whereNotNull(); + return [...homeMemberships, ...opponentMemberships].nonNulls; }), )) .expand((element) => element); @@ -244,7 +244,7 @@ class ByGermanyWrestlingApi extends WrestlingApi { club: club, ); }); - return teams.whereNotNull().toSet(); + return teams.nonNulls.toSet(); } @override @@ -327,7 +327,7 @@ class ByGermanyWrestlingApi extends WrestlingApi { orgSyncId: entry.key, ); })); - return teamMatches.whereNotNull().toSet(); + return teamMatches.nonNulls.toSet(); } return []; } @@ -497,7 +497,7 @@ class ByGermanyWrestlingApi extends WrestlingApi { log.severe('Could not parse action str $str', e, st); return null; } - }).whereNotNull(); + }).nonNulls; return MapEntry(bout, boutActions); })); return Map.fromEntries(boutActionMapEntries);