You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, it's an old issue but for future readers interested in using this package on web :
Blocking part is SquareSet.dart which uses full precision 64 bit integers that javascript cannot represent exactly, however you can use this package (and by extension chessground) with flutter for web assembly.
flutter run -d chrome --wasm
flutter build web --release --wasm
Web assembly support dart 64bit integers. Web assembly is not yet fully supported by all browsers for now (chrome ok but no firefox and safari) but it seems Flutter web is going that way for future.
If you can't wait for safari and firefox support of WA, your solutions are to rewrite SquareSet.dart :
As a class storing a BigInt and replace all 64bit integers with BigInt.parse('0x....'). This pub package has done this work but is a bit outdated compared to dartchess.
In both cases, you'll lose performance compared with extension type on int in the current implementation, but I don't know if that has any real impact.
Hi! Excellent package! Do you plan to add web?
The text was updated successfully, but these errors were encountered: