diff --git a/lib/src/model/common/eval.dart b/lib/src/model/common/eval.dart index 3835f67a60..0691c850e7 100644 --- a/lib/src/model/common/eval.dart +++ b/lib/src/model/common/eval.dart @@ -86,7 +86,7 @@ class ClientEval with _$ClientEval implements Eval { return pvs .where((e) => e.moves.isNotEmpty) .map((e) => e._firstMoveWithWinningChances(position.turn)) - .whereNotNull() + .nonNulls .sorted((a, b) => b.winningChances.compareTo(a.winningChances)) .toIList(); } diff --git a/lib/src/model/puzzle/puzzle_session.dart b/lib/src/model/puzzle/puzzle_session.dart index 609112286a..031331dbda 100644 --- a/lib/src/model/puzzle/puzzle_session.dart +++ b/lib/src/model/puzzle/puzzle_session.dart @@ -63,7 +63,7 @@ class PuzzleSession extends _$PuzzleSession { Future _update( PuzzleSessionData Function(PuzzleSessionData d) update, ) async { - await _store.setString(_storageKey, jsonEncode((update(state)).toJson())); + await _store.setString(_storageKey, jsonEncode(update(state).toJson())); } PuzzleSessionData? get _stored { diff --git a/lib/src/model/user/profile.dart b/lib/src/model/user/profile.dart index 932325ea91..a6d708a938 100644 --- a/lib/src/model/user/profile.dart +++ b/lib/src/model/user/profile.dart @@ -53,7 +53,7 @@ class Profile with _$Profile { } return link; }) - .whereNotNull() + .nonNulls .toIList(), ); }