format with dart format

This commit is contained in:
2025-06-25 16:39:51 +02:00
parent 0c39f4836e
commit b41821df47
4 changed files with 63 additions and 58 deletions

View File

@@ -35,10 +35,7 @@ class _CustomNavigationBarState extends State<CustomNavigationBar>
centerTitle: true,
title: Text(
_currentTabTitle(),
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
backgroundColor: CustomTheme.backgroundColor,
scrolledUnderElevation: 0,
@@ -114,6 +111,7 @@ class _CustomNavigationBarState extends State<CustomNavigationBar>
currentIndex = index;
});
}
String _currentTabTitle() {
switch (currentIndex) {
case 0:

View File

@@ -134,9 +134,7 @@ class _GameHistoryViewState extends State<GameHistoryView> {
children: [
Column(
children: [
Container(
margin: EdgeInsets.only(bottom: 75),
),
Container(margin: EdgeInsets.only(bottom: 75)),
Expanded(
child: gameHistoryListView(allGameData, suggestedGameData),
),
@@ -155,9 +153,15 @@ class _GameHistoryViewState extends State<GameHistoryView> {
return;
}
final suggestions = allGameData.where((currentGame) {
return currentGame['game'].toString().toLowerCase().contains(value.toLowerCase()) ||
currentGame['title'].toString().toLowerCase().contains(value.toLowerCase()) ||
currentGame['group'].toString().toLowerCase().contains(value.toLowerCase());
return currentGame['game'].toString().toLowerCase().contains(
value.toLowerCase(),
) ||
currentGame['title'].toString().toLowerCase().contains(
value.toLowerCase(),
) ||
currentGame['group'].toString().toLowerCase().contains(
value.toLowerCase(),
);
});
setState(() {
suggestedGameData.clear();
@@ -183,6 +187,6 @@ Widget gameHistoryListView(allGameData, suggestedGameData) {
itemBuilder: (context, index) {
final currentGame = suggestedGameData[index];
return GameHistoryListTile(currentGame);
}
},
);
}

View File

@@ -16,14 +16,17 @@ Widget GameHistoryListTile(Map<String, dynamic> currentGame){
Text("${currentGame['game']}: ", style: TextStyle(fontSize: 20)),
Text("${currentGame['title']}", style: TextStyle(fontSize: 20)),
Spacer(),
Text("${currentGame['players']} Spieler", style: TextStyle(fontSize: 20))
Text(
"${currentGame['players']} Spieler",
style: TextStyle(fontSize: 20),
),
],
),
Row(
children: [
Text("${currentGame['group']}", style: TextStyle(fontSize: 20)),
Spacer(),
Text("${currentGame['date']}", style: TextStyle(fontSize: 20))
Text("${currentGame['date']}", style: TextStyle(fontSize: 20)),
],
),
],

View File

@@ -9,6 +9,6 @@ Widget TopCenteredMessage(String message) {
"$message",
style: TextStyle(fontSize: 20),
textAlign: TextAlign.center,
)
),
);
}