dart_stack
dart_stack copied to clipboard
toList() not working on iOS
There is a compilation exception on iOS. It works on the web and Android.
Hi @Mike-3 thanks for opening an issue for this
Can you share the exception?
This is the error essage
Interesting, would it be possible to share your code so I could try to reproduce it?
void _addTowersOutput(int n, int from, int to) { var output = ''; int offset; var rowCount = max(_towers[0].length, max(_towers[1].length, _towers[2].length)); rowCount = max(2, rowCount);
for (int row = 0; row < rowCount; row++) {
for (var tower = 0; tower < _towers.length; tower++) {
offset = rowCount - _towers[tower].length;
output += (row >= offset
? _towers[tower].toList()[_towers[tower].length - 1 - (row - offset)].toString()
: "|").padLeft(tower == 0 ? 3 : 6);
}
output += "\n";
}
towersOutput.add((output.trimRight(), n, from, to));
}