From 2bcf9ae7d02b73826e130804c4edd31336413c24 Mon Sep 17 00:00:00 2001 From: Andrea Cioccarelli <23010471+cioccarellia@users.noreply.github.com> Date: Tue, 28 Jan 2025 01:19:40 +0100 Subject: [PATCH 1/3] When ratingDiff is zero (e.g. draw), color is yellow instead of red --- lib/src/view/game/game_player.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/view/game/game_player.dart b/lib/src/view/game/game_player.dart index b92b0d4539..34af31aa16 100644 --- a/lib/src/view/game/game_player.dart +++ b/lib/src/view/game/game_player.dart @@ -138,7 +138,9 @@ class GamePlayer extends StatelessWidget { color: player.ratingDiff! > 0 ? context.lichessColors.good - : context.lichessColors.error, + : player.ratingDiff! == 0 + ? context.lichessColors.brag + : context.lichessColors.error, ), ), ], From 9b6cbd6de980714b96bdb134420d102be37f872a Mon Sep 17 00:00:00 2001 From: Andrea Cioccarelli <23010471+cioccarellia@users.noreply.github.com> Date: Tue, 28 Jan 2025 20:52:18 +0000 Subject: [PATCH 2/3] Format: Ran `dart format` on game_player.dart --- lib/src/view/game/game_player.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/src/view/game/game_player.dart b/lib/src/view/game/game_player.dart index 34af31aa16..d0d1f6755a 100644 --- a/lib/src/view/game/game_player.dart +++ b/lib/src/view/game/game_player.dart @@ -133,14 +133,14 @@ class GamePlayer extends StatelessWidget { children: [ if (player.ratingDiff != null) TextSpan( - text: ' ${player.ratingDiff! > 0 ? '+' : ''}${player.ratingDiff}', + text: + ' ${player.ratingDiff! > 0 ? '+' : ''}${player.ratingDiff}', style: TextStyle( - color: - player.ratingDiff! > 0 - ? context.lichessColors.good - : player.ratingDiff! == 0 - ? context.lichessColors.brag - : context.lichessColors.error, + color: player.ratingDiff! > 0 + ? context.lichessColors.good + : player.ratingDiff! == 0 + ? context.lichessColors.brag + : context.lichessColors.error, ), ), ], From 5383a0d93fe2c384b4def99385f6d1a1781e0484 Mon Sep 17 00:00:00 2001 From: Andrea Cioccarelli <23010471+cioccarellia@users.noreply.github.com> Date: Tue, 28 Jan 2025 21:16:29 +0000 Subject: [PATCH 3/3] Format 2: Ran dart format on game_player.dart --- lib/src/view/game/game_player.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/src/view/game/game_player.dart b/lib/src/view/game/game_player.dart index d0d1f6755a..93ff0e2e67 100644 --- a/lib/src/view/game/game_player.dart +++ b/lib/src/view/game/game_player.dart @@ -133,8 +133,7 @@ class GamePlayer extends StatelessWidget { children: [ if (player.ratingDiff != null) TextSpan( - text: - ' ${player.ratingDiff! > 0 ? '+' : ''}${player.ratingDiff}', + text: ' ${player.ratingDiff! > 0 ? '+' : ''}${player.ratingDiff}', style: TextStyle( color: player.ratingDiff! > 0 ? context.lichessColors.good