I Have a list and items [0,1,2,3,4,5]
when i try to print this list
i get output like this: [0, 1, 2, 3, 4, 5]
But I want to get output like this
0
1
2
3
4
5
My Code:
GFButton(
onPressed: () {
_mainController.selected_Tags
.forEach((element) => print(element));
},
text: "Test",
)
2
Answers
I solved issue;
I’m assuming you mean the other way around in your question (without line breaks). As your code does print in multiple lines.
Try:
it will join the
numbers
without anything as the delimiter. You can also join with a comma if you want: