Replaced string & if statement with visibility widget

This commit is contained in:
2025-07-13 00:55:28 +02:00
parent af630539db
commit 7733d3bd5c

View File

@@ -121,7 +121,7 @@ class _ActiveGameViewState extends State<ActiveGameView> {
children: [ children: [
CupertinoListTile( CupertinoListTile(
title: Text( title: Text(
AppLocalizations.of(context).statistics, AppLocalizations.of(context).game_process,
), ),
backgroundColorActivated: backgroundColorActivated:
CustomTheme.backgroundColor, CustomTheme.backgroundColor,
@@ -131,8 +131,9 @@ class _ActiveGameViewState extends State<ActiveGameView> {
builder: (_) => GraphView( builder: (_) => GraphView(
gameSession: gameSession, gameSession: gameSession,
)))), )))),
if (!gameSession.isPointsLimitEnabled) Visibility(
CupertinoListTile( visible: !gameSession.isPointsLimitEnabled,
child: CupertinoListTile(
title: Text( title: Text(
AppLocalizations.of(context).end_game, AppLocalizations.of(context).end_game,
style: gameSession.roundNumber > 1 && style: gameSession.roundNumber > 1 &&
@@ -148,6 +149,7 @@ class _ActiveGameViewState extends State<ActiveGameView> {
_showEndGameDialog(); _showEndGameDialog();
} }
}), }),
),
CupertinoListTile( CupertinoListTile(
title: Text( title: Text(
AppLocalizations.of(context).delete_game, AppLocalizations.of(context).delete_game,