fix: button enabled condition
Some checks failed
Pull Request Pipeline / test (pull_request) Failing after 49s
Pull Request Pipeline / lint (pull_request) Successful in 50s

This commit is contained in:
2026-05-10 18:17:01 +02:00
parent 2a3c0fc98c
commit f98208b508

View File

@@ -231,11 +231,11 @@ class _CreateMatchViewState extends State<CreateMatchView> {
/// Determines whether the "Create Match" button should be enabled. /// Determines whether the "Create Match" button should be enabled.
/// ///
/// Returns `true` if: /// Returns `true` if:
/// - A ruleset is selected AND /// - A game is selected AND
/// - Either a group is selected OR at least 2 players are selected. /// - Either a group is selected OR at least 2 players are selected.
bool _enableCreateGameButton() { bool _enableCreateGameButton() {
return (selectedGroup != null || return ((selectedGroup != null || selectedPlayers.length > 1) &&
(selectedPlayers.length > 1) && selectedGame != null); selectedGame != null);
} }
/// Handles navigation when the create or save button is pressed. /// Handles navigation when the create or save button is pressed.