Reputation: 337
I have a long String that contains comma-separated values. How can I split that string and save those substrings into List in dart/Flutter?
Please help me to do this
String myname = dd.data.toString();
Upvotes: 0
Views: 1720
Reputation: 1875
You can use split for this.
String s = "a,b,c,d,e";
List<String> list = s.split(",");
Upvotes: 3