Skip to content

Commit

Permalink
fix: Refactor whereNotNull to nonNulls
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustl22 committed Aug 3, 2024
1 parent fedf1ea commit 890e5e6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class ByGermanyWrestlingApi extends WrestlingApi {
organization: organization,
);
});
return clubs.whereNotNull().toSet();
return clubs.nonNulls.toSet();
}

@override
Expand All @@ -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);
Expand Down Expand Up @@ -244,7 +244,7 @@ class ByGermanyWrestlingApi extends WrestlingApi {
club: club,
);
});
return teams.whereNotNull().toSet();
return teams.nonNulls.toSet();
}

@override
Expand Down Expand Up @@ -327,7 +327,7 @@ class ByGermanyWrestlingApi extends WrestlingApi {
orgSyncId: entry.key,
);
}));
return teamMatches.whereNotNull().toSet();
return teamMatches.nonNulls.toSet();
}
return [];
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 890e5e6

Please sign in to comment.