format with dart format
This commit is contained in:
@@ -35,10 +35,7 @@ class _CustomNavigationBarState extends State<CustomNavigationBar>
|
|||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
title: Text(
|
title: Text(
|
||||||
_currentTabTitle(),
|
_currentTabTitle(),
|
||||||
style: const TextStyle(
|
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
backgroundColor: CustomTheme.backgroundColor,
|
backgroundColor: CustomTheme.backgroundColor,
|
||||||
scrolledUnderElevation: 0,
|
scrolledUnderElevation: 0,
|
||||||
@@ -114,6 +111,7 @@ class _CustomNavigationBarState extends State<CustomNavigationBar>
|
|||||||
currentIndex = index;
|
currentIndex = index;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String _currentTabTitle() {
|
String _currentTabTitle() {
|
||||||
switch (currentIndex) {
|
switch (currentIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|||||||
@@ -134,9 +134,7 @@ class _GameHistoryViewState extends State<GameHistoryView> {
|
|||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(margin: EdgeInsets.only(bottom: 75)),
|
||||||
margin: EdgeInsets.only(bottom: 75),
|
|
||||||
),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: gameHistoryListView(allGameData, suggestedGameData),
|
child: gameHistoryListView(allGameData, suggestedGameData),
|
||||||
),
|
),
|
||||||
@@ -155,9 +153,15 @@ class _GameHistoryViewState extends State<GameHistoryView> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final suggestions = allGameData.where((currentGame) {
|
final suggestions = allGameData.where((currentGame) {
|
||||||
return currentGame['game'].toString().toLowerCase().contains(value.toLowerCase()) ||
|
return currentGame['game'].toString().toLowerCase().contains(
|
||||||
currentGame['title'].toString().toLowerCase().contains(value.toLowerCase()) ||
|
value.toLowerCase(),
|
||||||
currentGame['group'].toString().toLowerCase().contains(value.toLowerCase());
|
) ||
|
||||||
|
currentGame['title'].toString().toLowerCase().contains(
|
||||||
|
value.toLowerCase(),
|
||||||
|
) ||
|
||||||
|
currentGame['group'].toString().toLowerCase().contains(
|
||||||
|
value.toLowerCase(),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
setState(() {
|
setState(() {
|
||||||
suggestedGameData.clear();
|
suggestedGameData.clear();
|
||||||
@@ -183,6 +187,6 @@ Widget gameHistoryListView(allGameData, suggestedGameData) {
|
|||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final currentGame = suggestedGameData[index];
|
final currentGame = suggestedGameData[index];
|
||||||
return GameHistoryListTile(currentGame);
|
return GameHistoryListTile(currentGame);
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -16,14 +16,17 @@ Widget GameHistoryListTile(Map<String, dynamic> currentGame){
|
|||||||
Text("${currentGame['game']}: ", style: TextStyle(fontSize: 20)),
|
Text("${currentGame['game']}: ", style: TextStyle(fontSize: 20)),
|
||||||
Text("${currentGame['title']}", style: TextStyle(fontSize: 20)),
|
Text("${currentGame['title']}", style: TextStyle(fontSize: 20)),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
Text("${currentGame['players']} Spieler", style: TextStyle(fontSize: 20))
|
Text(
|
||||||
|
"${currentGame['players']} Spieler",
|
||||||
|
style: TextStyle(fontSize: 20),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Text("${currentGame['group']}", style: TextStyle(fontSize: 20)),
|
Text("${currentGame['group']}", style: TextStyle(fontSize: 20)),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
Text("${currentGame['date']}", style: TextStyle(fontSize: 20))
|
Text("${currentGame['date']}", style: TextStyle(fontSize: 20)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -9,6 +9,6 @@ Widget TopCenteredMessage(String message) {
|
|||||||
"$message",
|
"$message",
|
||||||
style: TextStyle(fontSize: 20),
|
style: TextStyle(fontSize: 20),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user