updateAgentConfig method
Implementation
void updateAgentConfig(AgentConfigs config) {
_name = config.displayName ?? _name;
_description = config.description ?? _description;
_displayName = config.displayName ?? _displayName;
_image = config.image ?? _image;
_colors = config.colors ?? _colors;
_selectedLanguages = config.languages?.map((code) => languageCodes.entries.firstWhere((entry) => entry.value == code, orElse: () => MapEntry(code, code)).key).toList() ?? _selectedLanguages;
_speechToTextEnabled = config.isSpeech2text ?? _speechToTextEnabled;
_voice_code = config.voice_code ?? _voice_code;
notifyListeners();
}