merge duplicate if statements for group and winner sections

This commit is contained in:
gelbeinhalb
2025-11-27 17:04:08 +01:00
parent ae348499d4
commit cc50e497c9

View File

@@ -60,7 +60,7 @@ class _GameHistoryTileState extends State<GameHistoryTile> {
const SizedBox(height: 8), const SizedBox(height: 8),
if (group != null) if (group != null) ...[
Row( Row(
children: [ children: [
const Icon( const Icon(
@@ -81,10 +81,10 @@ class _GameHistoryTileState extends State<GameHistoryTile> {
), ),
], ],
), ),
const SizedBox(height: 12),
],
if (group != null) const SizedBox(height: 12), if (winner != null) ...[
if (winner != null)
Container( Container(
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 12), padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 12),
decoration: BoxDecoration( decoration: BoxDecoration(
@@ -114,8 +114,8 @@ class _GameHistoryTileState extends State<GameHistoryTile> {
], ],
), ),
), ),
const SizedBox(height: 12),
if (winner != null) const SizedBox(height: 12), ],
if (allPlayers.isNotEmpty) ...[ if (allPlayers.isNotEmpty) ...[
const Text( const Text(