From ca1f0c31da6edfdd54573ca1808e9a42dbb0eb2a Mon Sep 17 00:00:00 2001 From: arturplaczek <33895544+arturplaczek@users.noreply.github.com> Date: Fri, 6 May 2022 11:42:06 +0200 Subject: [PATCH] fix: add Row above FittedBox to align `ScoreView` to left (#351) --- lib/game/view/widgets/score_view.dart | 35 +++++++++++++++------------ 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/lib/game/view/widgets/score_view.dart b/lib/game/view/widgets/score_view.dart index 4c0c3f46..2d6c72d0 100644 --- a/lib/game/view/widgets/score_view.dart +++ b/lib/game/view/widgets/score_view.dart @@ -17,9 +17,10 @@ class ScoreView extends StatelessWidget { context.select((GameBloc bloc) => bloc.state.status.isGameOver); return Padding( - padding: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 2, + padding: const EdgeInsets.only( + left: 12, + top: 2, + bottom: 2, ), child: AnimatedSwitcher( duration: kThemeAnimationDuration, @@ -50,19 +51,23 @@ class _ScoreDisplay extends StatelessWidget { Widget build(BuildContext context) { final l10n = context.l10n; - return FittedBox( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Text( - l10n.score.toLowerCase(), - style: Theme.of(context).textTheme.subtitle1, + return Row( + children: [ + FittedBox( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Text( + l10n.score.toLowerCase(), + style: Theme.of(context).textTheme.subtitle1, + ), + const _ScoreText(), + const RoundCountDisplay(), + ], ), - const _ScoreText(), - const RoundCountDisplay(), - ], - ), + ), + ], ); } }