Reputation: 434
I have:
List<double> prices = [20.5, 10.0, 18.6, 41.8];
I need as Parameter Value:
pricesString : ["20.5", "10.0", "18.6", "41.8"],
Upvotes: 0
Views: 1475
Reputation: 434
pricesString : prices.map((e) => e.toString()).toList(),
Which is passing the following list:
pricesString : ["20.5", "10.0", "18.6", "41.8"]
Upvotes: 3
Reputation: 90
List<String> prices = List.generate(firtList.length,(i) => firtList[i].toString());
Upvotes: 0