Giter Site home page Giter Site logo

Comments (3)

simolus3 avatar simolus3 commented on July 29, 2024

Can you post the web3dart-related stacktrace of the exception? Thanks.
Btw., the await subscription.asFuture() and .take(1) were added to the example so that it only listens to one event and terminates after that. If you want to listen for events continuously, I recommend removing the await subscription.asFuture() and .take(1) lines. (This exception is still a bug in the library and unrelated to that)

from web3dart.

liuyuejiang avatar liuyuejiang commented on July 29, 2024
I/flutter ( 7931): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter ( 7931): The following NoSuchMethodError was thrown while finalizing the widget tree:
I/flutter ( 7931): The method 'dispose' was called on null.
I/flutter ( 7931): Receiver: null
I/flutter ( 7931): Tried calling: dispose()
I/flutter ( 7931):
I/flutter ( 7931): When the exception was thrown, this was the stack:
I/flutter ( 7931): #0      Object.noSuchMethod  (dart:core-patch/object_patch.dart:50:5)
I/flutter ( 7931): #1      _LightDetailPageState.dispose 
package:newuicontrollor/…/devices/lightdetail.dart:230
I/flutter ( 7931): #2      StatefulElement.unmount 
package:flutter/…/widgets/framework.dart:3916
I/flutter ( 7931): #3      _InactiveElements._unmount 
package:flutter/…/widgets/framework.dart:1697
I/flutter ( 7931): #4      _InactiveElements._unmount.<anonymous closure> 

from web3dart.

simolus3 avatar simolus3 commented on July 29, 2024

Ah, I see it now. When the network is "Public", you do

final client = Web3Client(httpUrl, Client(), socketConnector: () {
        return IOWebSocketChannel.connect(wsUrl).cast<String>();
});

This declares the client as a local variable, so just remove the final and you're good.

I think the long delay is caused by infura, I'm not sure if anything can be done against that. If I find out more I'll let you know.

from web3dart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.