GameHistoryView anpassen #20

Merged
flixcoo merged 27 commits from feature/2-gamehistoryview-anpassen into development 2025-11-30 15:59:25 +00:00
2 changed files with 47 additions and 19 deletions
Showing only changes of commit 95f0861a79 - Show all commits

View File

@@ -134,16 +134,16 @@ class _GameHistoryViewState extends State<GameHistoryView> {
children: [ children: [
Column( Column(
children: [ children: [
Container(margin: EdgeInsets.only(bottom: 75)), Container(margin: const EdgeInsets.only(bottom: 75)),
Expanded( Expanded(
child: gameHistoryListView(allGameData, suggestedGameData), child: gameHistoryListView(allGameData, suggestedGameData),
), ),
], ],
), ),
Container( Container(
margin: EdgeInsets.only(top: 10, bottom: 10, left: 10, right: 10), margin: const EdgeInsets.only(top: 10, bottom: 10, left: 10, right: 10),
child: SearchBar( child: SearchBar(
leading: Icon(Icons.search), leading: const Icon(Icons.search),
onChanged: (value) { onChanged: (value) {
if (value.isEmpty) { if (value.isEmpty) {
setState(() { setState(() {
@@ -195,9 +195,9 @@ Widget gameHistoryListView(allGameData, suggestedGameData) {
return GameHistoryTile( return GameHistoryTile(
gameTitle: currentGame['title'], gameTitle: currentGame['title'],
gameType: currentGame['game'], gameType: currentGame['game'],
ruleset: currentGame['date'], date: currentGame['date'],
groupName: currentGame['group'], groupName: currentGame['group'],
winner: "ich", winner: 'ich',
); );
}, },
); );

View File

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