How to replace specific words in the string in flutter?
I have the below string input in flutter and I want to replace or remove a word if it occurs in a list
String t1 = "100 ml parachute oil hair"; List A = ["a","b","c","d","ml"];
how can I do it?
try
String replaceWord=""; // empty string for remove, you can replace as you want for (String word in A) { ti.replaceAll(word ,replaceWord); }
1.4m articles
1.4m replys
5 comments
57.0k users