List<String> _productIds = widget.productIds;
String _storeId = widget.storeid;
String jsonProductId = jsonEncode(_productIds); //that give me[\"abc\",\"abc\",\"abc\"]
1

There are 1 best solutions below

0
On

I guess you want to pass comma separated String into http request. you can try converting the list to comma separated string.

List<String> _productIds = widget.productIds;
String requestString = _productIds .join(', ');
print(s);