Added dispose & formatting

This commit is contained in:
2026-01-07 14:15:23 +01:00
parent 4b1d3923a0
commit 2811ea892e

View File

@@ -91,6 +91,12 @@ class _CreateMatchViewState extends State<CreateMatchView> {
}); });
} }
@override
void dispose() {
_matchNameController.dispose();
super.dispose();
}
@override @override
void didChangeDependencies() { void didChangeDependencies() {
super.didChangeDependencies(); super.didChangeDependencies();
@@ -262,8 +268,8 @@ class _CreateMatchViewState extends State<CreateMatchView> {
/// Determines whether the "Create Game" button should be enabled based on /// Determines whether the "Create Game" button should be enabled based on
/// the current state of the input fields. /// the current state of the input fields.
bool _enableCreateGameButton() { bool _enableCreateGameButton() {
return selectedGroup != null || return (selectedGroup != null ||
(selectedPlayers != null && selectedPlayers!.length > 1) && (selectedPlayers != null && selectedPlayers!.length > 1)) &&
selectedRuleset != null; selectedRuleset != null;
} }
} }