Skip to content

Commit

Permalink
feat: move btn to the side
Browse files Browse the repository at this point in the history
it looks better visually, and uses space more efficiently
  • Loading branch information
Mauritz8 committed Jul 4, 2024
1 parent 0724254 commit 6c9656a
Showing 1 changed file with 29 additions and 26 deletions.
55 changes: 29 additions & 26 deletions lib/src/view/user/perf_stats_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -269,36 +269,39 @@ class _Body extends ConsumerWidget {
]),
statGroupSpace,
Row(
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'${context.l10n.perfStatTotalGames} '.localizeNumbers(),
style: Styles.sectionTitle,
),
Text(
data.totalGames.toString().localizeNumbers(),
style: _mainValueStyle,
Row(
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
'${context.l10n.perfStatTotalGames} '
.localizeNumbers(),
style: Styles.sectionTitle,
),
Text(
data.totalGames.toString().localizeNumbers(),
style: _mainValueStyle,
),
],
),

if (gamePerfMap.keys.contains(perf))
TextButton(
onPressed: () => pushPlatformRoute(
context,
builder: (context) => GameHistoryScreen(
user: user.lightUser,
isOnline: true,
gamePerf: gamePerfMap[perf],
games: data.totalGames,
),
),
child: Text(context.l10n.perfStatViewTheGames),
),
],
),
if (gamePerfMap.keys.contains(perf))
TextButton(
onPressed: () => pushPlatformRoute(
context,
builder: (context) => GameHistoryScreen(
user: user.lightUser,
isOnline: true,
gamePerf: gamePerfMap[perf],
games: data.totalGames,
),
),
style: TextButton.styleFrom(
alignment: Alignment.centerLeft,
padding: EdgeInsets.zero,
),
child: Text(context.l10n.perfStatViewTheGames),
),
subStatSpace,
StatCardRow([
StatCard(
Expand Down

0 comments on commit 6c9656a

Please sign in to comment.