simolus3/web3dart

The integer literal 0xFFFFFFFFFFFFFFFF can't be represented exactly in JavaScript

Closed this issue · 1 comments

Steps :

1.-Start new project.
2.-Add web3dart dependency in pubspec.yaml
3.-Import package in main.dart file import 'package:web3dart/web3dart.dart';
4.-Compile using chrome device.

Result:

The compile file showing this message:

../../../../developer/flutter/.pub-cache/hosted/pub.dartlang.org/pointycastle-3.1.3/lib/key_derivators/argon2.dart:42:27: Error: The integer literal 0xFFFFFFFFFFFFFFFF can't be represented exactly in JavaScript.
Try changing the literal to something that can be represented in Javascript. In Javascript 0x10000000000000000 is the nearest value that can be represented exactly.
static const int M32L = 0xFFFFFFFFFFFFFFFF;
^^^^^^^^^^^^^^^^^^
../../../../developer/flutter/.pub-cache/hosted/pub.dartlang.org/pointycastle-3.1.3/lib/src/utils.dart:313:9: Error: The integer literal 0xFFFFFFFFFFFFFFFF can't be represented exactly in JavaScript.
Try changing the literal to something that can be represented in Javascript. In Javascript 0x10000000000000000 is the nearest value that can be represented exactly.
((0xFFFFFFFFFFFFFFFF) ^ ((1 << (64 - count)) - 1));
^^^^^^^^^^^^^^^^^^
../../../../developer/flutter/.pub-cache/hosted/pub.dartlang.org/pointycastle-3.1.3/lib/src/platform_check/platform_check.dart:6:35: Error: Method not found: 'getPlatform'.
static Platform get instance => getPlatform();
^^^^^^^^^^^

This doesn't happen using Android or iOS.

Im trying to use this package in order to call Metamask for sign transactions... and for this reason I need to launch it over Chrome.

Thanks

This is essentially because of bcgit/pc-dart#112, which will be fixed soon.