Refactored views

This commit is contained in:
2026-01-07 13:27:39 +01:00
parent a78614851b
commit 6e45e9435b
11 changed files with 117 additions and 67 deletions

View File

@@ -20,10 +20,12 @@ class ChooseGameView extends StatefulWidget {
}
class _ChooseGameViewState extends State<ChooseGameView> {
late int selectedGameIndex;
/// Controller for the search bar
final TextEditingController searchBarController = TextEditingController();
/// Currently selected game index
late int selectedGameIndex;
@override
void initState() {
selectedGameIndex = widget.initialGameIndex;

View File

@@ -136,8 +136,7 @@ class _ChooseGroupViewState extends State<ChooseGroupView> {
);
}
/// Filters the groups based on the search query.
/// TODO: Maybe implement also targetting player names?
/// Filters the groups based on the search [query].
void filterGroups(String query) {
setState(() {
if (query.isEmpty) {

View File

@@ -19,6 +19,7 @@ class ChooseRulesetView extends StatefulWidget {
}
class _ChooseRulesetViewState extends State<ChooseRulesetView> {
/// Currently selected ruleset index
late int selectedRulesetIndex;
@override

View File

@@ -26,7 +26,6 @@ class CreateMatchView extends StatefulWidget {
}
class _CreateMatchViewState extends State<CreateMatchView> {
/// Reference to the app database
late final AppDatabase db;
/// Controller for the match name input field