setLanguage method
- String language
Switches the syntax-highlighting mode and notifies listeners so the dropdown rebuilds with the new selection.
Implementation
void setLanguage(String language) {
if (_selectedLanguage == language) return;
_selectedLanguage = language;
_codeController.language = _languages[language];
notifyListeners();
}