MatchTiles only show when recent games are available
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user