I would like to have a list of tuples in dart/flutter, loop over them and read the first and second variable. There is a pub.dev package that creates a tuple in flutter. Is there another way in dart? Do I need to use a class to create a tuple like the flutter package does?
I began to create an example in dart pad
void main() {
List testList = [("a",1),("b",2),("c",3),("d",4),("e",5)];
for (var i = 0; i < 5; i++) {
print('hello $i');
currentItem = testList[i];
}
}