toggleLanguageSelection method

void toggleLanguageSelection(
  1. String language
)

Implementation

void toggleLanguageSelection(String language) {
  if (_selectedLanguages.contains(language)) {
    _selectedLanguages.remove(language);
  } else {
    _selectedLanguages.add(language);
  }
  notifyListeners();
}