I need to add the value in the list which is comma separated.
Sample data:
English,Hindi,French
Below is the class of List:
Dart has a very good type checking system and I think your problem is an obvious one based on the error message. You must convert your list of String
into a list of Language
. I don't recall the syntax from the top of my head but I think you should be able to convert your list of String
with .map
>((item) => Language(item))