xclud / web3dart

Ethereum library, written in Dart.
https://pub.dev/packages/web3dart
MIT License
171 stars 94 forks source link

got this error <= /flutter (12568): [ERROR:flutter/shell/common/shell.cc(103)] Dart Unhandled Exception: Bad state: No element, stack trace: #0 #37

Open khaledmurtaja opened 2 years ago

khaledmurtaja commented 2 years ago

i am getting this error when i am trying to extract a function form the smart contract code example : contract.function("getTicketNumber").

dart points to this line which cause that error

TheGreatAxios commented 2 years ago

@khaledmurtaja Please upload your smart contract, your generated file (if you have them), and your code that is calling the function. Thanks!

Additionally, please upload the error. If you do not have an exact trace on it; wrap your code in try...catch and have the catch response by (err, trace) and print both out to the console