add limit check
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run

This commit is contained in:
otsmr 2026-01-14 23:28:31 +01:00
parent 285859cee6
commit 085702c0bb

View file

@ -78,7 +78,9 @@ class _SelectAdditionalUsers extends State<SelectAdditionalUsers> {
void toggleSelectedUser(int userId) {
if (_alreadySelected.contains(userId)) return;
if (!selectedUsers.contains(userId)) {
if (selectedUsers.length < widget.limit) {
selectedUsers.add(userId);
}
} else {
selectedUsers.remove(userId);
}