Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toList() not working on iOS #32

Open
Mike-3 opened this issue Dec 7, 2024 · 4 comments
Open

toList() not working on iOS #32

Mike-3 opened this issue Dec 7, 2024 · 4 comments
Labels
bug Something isn't working question Further information is requested

Comments

@Mike-3
Copy link

Mike-3 commented Dec 7, 2024

There is a compilation exception on iOS. It works on the web and Android.

@ammaratef45
Copy link
Owner

Hi @Mike-3 thanks for opening an issue for this

Can you share the exception?

@ammaratef45 ammaratef45 added bug Something isn't working question Further information is requested labels Dec 11, 2024
@Mike-3
Copy link
Author

Mike-3 commented Dec 17, 2024

20241217_164106
This is the error essage

@ammaratef45
Copy link
Owner

Interesting, would it be possible to share your code so I could try to reproduce it?

@Mike-3
Copy link
Author

Mike-3 commented Dec 20, 2024

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));

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants