I need to add the value in the list which is comma separated.
Sample data:
English,Hindi,French
Below is the class of List:
One way you can do this is like this.
List _selectedLanguages; _selectedLanguages = (responseBody['user_lang'].split(',') as List).map((text) => Language(name: text)).toList();