Describe the bug
I cannot use the library flutter_web3. Get JS related errors when building.
I could not find a fix online.
To Reproduce
Steps to reproduce the behavior:
Install the library flutter_web3
Then run: flutter run
Build fails... See logs below
Build logs
../../../../../dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_web3-2.1.9/lib/src/ethereum/ethereum.dart:66:7: Error: Method not found: 'hasProperty'.
hasProperty(_window, 'ethereum') || hasProperty(_window, 'BinanceChain');
^^^^^^^^^^^
../../../../../dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_web3-2.1.9/lib/src/ethereum/ethereum.dart:66:43: Error: Method not found: 'hasProperty'.
hasProperty(_window, 'ethereum') || hasProperty(_window, 'BinanceChain');
^^^^^^^^^^^
../../../../../dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_web3-2.1.9/lib/src/ethereum/ethereum.dart:147:50: Error: The method 'callMethod' isn't defined for the class 'Ethereum'.
- 'Ethereum' is from 'package:flutter_web3/src/ethereum/ethereum.dart' ('../../../../../dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_web3-2.1.9/lib/src/ethereum/ethereum.dart').
Try correcting the name to the name of an existing method, or defining a method named 'callMethod'.
off(String eventName, [Function? listener]) => callMethod(impl, 'off',
^^^^^^^^^^
../../../../../dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_web3-2.1.9/lib/src/ethereum/ethereum.dart:148:38: Error: The method 'allowInterop' isn't defined for the class 'Ethereum'.
Describe the bug I cannot use the library
flutter_web3
. Get JS related errors when building.I could not find a fix online.
To Reproduce Steps to reproduce the behavior:
flutter_web3
Build logs
Thanks, Stef