fix: add Row above FittedBox to align `ScoreView` to left (#351)

pull/362/head
arturplaczek 3 years ago committed by GitHub
parent 81c017cce7
commit ca1f0c31da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,9 +17,10 @@ class ScoreView extends StatelessWidget {
context.select((GameBloc bloc) => bloc.state.status.isGameOver); context.select((GameBloc bloc) => bloc.state.status.isGameOver);
return Padding( return Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.only(
horizontal: 16, left: 12,
vertical: 2, top: 2,
bottom: 2,
), ),
child: AnimatedSwitcher( child: AnimatedSwitcher(
duration: kThemeAnimationDuration, duration: kThemeAnimationDuration,
@ -50,19 +51,23 @@ class _ScoreDisplay extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final l10n = context.l10n; final l10n = context.l10n;
return FittedBox( return Row(
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, FittedBox(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Text( mainAxisAlignment: MainAxisAlignment.spaceEvenly,
l10n.score.toLowerCase(), children: [
style: Theme.of(context).textTheme.subtitle1, Text(
l10n.score.toLowerCase(),
style: Theme.of(context).textTheme.subtitle1,
),
const _ScoreText(),
const RoundCountDisplay(),
],
), ),
const _ScoreText(), ),
const RoundCountDisplay(), ],
],
),
); );
} }
} }

Loading…
Cancel
Save