MatchSummaryTile durch MatchTile ersetzen #142

Merged
flixcoo merged 17 commits from enhancement/137-matchsummarytile-durch-matchtile-ersetzen into development 2026-01-10 15:05:43 +00:00
2 changed files with 42 additions and 40 deletions
Showing only changes of commit 2c4cef76d8 - Show all commits

View File

@@ -34,7 +34,7 @@ class _HomeViewState extends State<HomeView> {
/// Recent matches to display, initially filled with skeleton matches
List<Match> recentMatches = List.filled(
2,
3,
Match(
name: 'Skeleton Match',
group: Group(
@@ -44,7 +44,6 @@ class _HomeViewState extends State<HomeView> {
Player(name: 'Skeleton Player 2'),
],
),
winner: Player(name: 'Skeleton Player 1'),
),
);
@@ -86,44 +85,46 @@ class _HomeViewState extends State<HomeView> {
),
],
),
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]),
),
);
},
),
),
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.only(top: 8.0),
padding: const EdgeInsets.symmetric(vertical: 16.0),
child: InfoTile(
width: constraints.maxWidth * 0.95,
title: loc.recent_matches,
icon: Icons.history_rounded,
content: Column(
children: [
if (recentMatches.isNotEmpty)
for (Match match in recentMatches)
Padding(
padding: const EdgeInsets.symmetric(
vertical: 6.0,
),
child: MatchTile(
compact: true,
width: constraints.maxWidth * 0.9,
match: match,
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(
fullscreenDialog: true,
builder: (context) =>
MatchResultView(match: match),
),
);
},
),
)
else
Center(
heightFactor: 5,
child: Text(loc.no_recent_matches_available),
),
],
),
),
),
Padding(
padding: EdgeInsets.zero,
child: InfoTile(
width: constraints.maxWidth * 0.95,
title: loc.quick_create,
@@ -173,6 +174,7 @@ class _HomeViewState extends State<HomeView> {
),
),
),
SizedBox(height: MediaQuery.paddingOf(context).bottom),
],
),
),

View File

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