MatchTiles only show when recent games are available

This commit is contained in:
2026-01-09 20:15:50 +01:00
parent 3d510d5b3d
commit afb7a5f1d4
2 changed files with 35 additions and 33 deletions

View File

@@ -86,40 +86,42 @@ class _HomeViewState extends State<HomeView> {
), ),
], ],
), ),
Padding( if (recentMatches.isNotEmpty)
padding: const EdgeInsets.only(top: 8.0), Padding(
child: MatchTile( padding: const EdgeInsets.only(top: 8.0),
compact: true, child: MatchTile(
width: constraints.maxWidth * 0.95, compact: true,
match: recentMatches[0], width: constraints.maxWidth * 0.95,
onTap: () { match: recentMatches[0],
Navigator.of(context).push( onTap: () {
MaterialPageRoute( Navigator.of(context).push(
fullscreenDialog: true, MaterialPageRoute(
builder: (context) => fullscreenDialog: true,
MatchResultView(match: recentMatches[0]), builder: (context) =>
), MatchResultView(match: recentMatches[0]),
); ),
}, );
},
),
), ),
), if (recentMatches.length > 1)
Padding( Padding(
padding: const EdgeInsets.only(top: 8.0), padding: const EdgeInsets.only(top: 8.0),
child: MatchTile( child: MatchTile(
compact: true, compact: true,
width: constraints.maxWidth * 0.95, width: constraints.maxWidth * 0.95,
match: recentMatches[1], match: recentMatches[1],
onTap: () { onTap: () {
Navigator.of(context).push( Navigator.of(context).push(
MaterialPageRoute( MaterialPageRoute(
fullscreenDialog: true, fullscreenDialog: true,
builder: (context) => builder: (context) =>
MatchResultView(match: recentMatches[1]), MatchResultView(match: recentMatches[1]),
), ),
); );
}, },
),
), ),
),
/*Padding( /*Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0), padding: const EdgeInsets.symmetric(vertical: 16.0),
child: InfoTile( child: InfoTile(

View File

@@ -1,7 +1,7 @@
name: game_tracker name: game_tracker
description: "Game Tracking App for Card Games" description: "Game Tracking App for Card Games"
publish_to: 'none' publish_to: 'none'
version: 0.0.1+23 version: 0.0.1+43
environment: environment:
sdk: ^3.8.1 sdk: ^3.8.1