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(
padding: const EdgeInsets.only(top: 8.0),
child: MatchTile(
compact: true,
width: constraints.maxWidth * 0.95,
match: recentMatches[0],
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(
fullscreenDialog: true,
builder: (context) =>
MatchResultView(match: recentMatches[0]),
),
);
},
if (recentMatches.isNotEmpty)
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: MatchTile(
compact: true,
width: constraints.maxWidth * 0.95,
match: recentMatches[0],
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(
fullscreenDialog: true,
builder: (context) =>
MatchResultView(match: recentMatches[0]),
),
);
},
),
),
),
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: MatchTile(
compact: true,
width: constraints.maxWidth * 0.95,
match: recentMatches[1],
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(
fullscreenDialog: true,
builder: (context) =>
MatchResultView(match: recentMatches[1]),
),
);
},
if (recentMatches.length > 1)
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: MatchTile(
compact: true,
width: constraints.maxWidth * 0.95,
match: recentMatches[1],
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(
fullscreenDialog: true,
builder: (context) =>
MatchResultView(match: recentMatches[1]),
),
);
},
),
),
),
/*Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0),
child: InfoTile(

View File

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