add basic came history tile

This commit is contained in:
Yannick
2025-11-21 15:44:27 +01:00
parent 69e13e877e
commit 95f0861a79
2 changed files with 47 additions and 19 deletions

View File

@@ -5,7 +5,7 @@ import 'package:skeletonizer/skeletonizer.dart';
class GameHistoryTile extends StatefulWidget {
final String gameTitle;
final String gameType;
final String ruleset;
final String date;
final String groupName;
final String winner;
@@ -13,7 +13,7 @@ class GameHistoryTile extends StatefulWidget {
super.key,
required this.gameTitle,
required this.gameType,
required this.ruleset,
required this.date,
required this.groupName,
required this.winner,
});
@@ -29,18 +29,46 @@ class _GameHistoryTileState extends State<GameHistoryTile> {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
widget.gameTitle,
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
const SizedBox(width: 5),
Text(
widget.gameType,
style: const TextStyle(fontSize: 14, color: Colors.grey),
),
],
Container(
margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 10),
decoration: BoxDecoration(
color: CustomTheme.boxColor,
border: Border.all(color: CustomTheme.boxBorder),
borderRadius: BorderRadius.circular(12),
),
child: Column(
children: [
Row(
children: [
Text(
widget.gameTitle,
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
overflow: TextOverflow.ellipsis,
),
],
),
Row(
children: [
Text(
widget.date,
style: const TextStyle(fontSize: 14, color: Colors.grey),
textAlign: TextAlign.left,
),
const SizedBox(width: 5),
const Text('·'),
const SizedBox(width: 5),
Text(
widget.gameType,
style: const TextStyle(fontSize: 14, color: Colors.grey),
textAlign: TextAlign.left,
),
],
),
const SizedBox(height: 15),
]
)
),
],
);