Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReceivePort in Project Example is not working #76

Open
ixsans opened this issue Dec 28, 2020 · 0 comments
Open

ReceivePort in Project Example is not working #76

ixsans opened this issue Dec 28, 2020 · 0 comments

Comments

@ixsans
Copy link

ixsans commented Dec 28, 2020

I'm trying to run project example. When i tried to log Geofencing callback, it's working. It's sending message from SendingPort but ReceivePort.listen() is not triggered. I want to modify some state inside this listen callback, but it's never called.

 IsolateNameServer.registerPortWithName(
        port.sendPort, 'geofencing_send_port');
    port.listen((dynamic data) {
      /// THIS CALLBACK NEVER TRIGGERED
      print('Event: $data');
      setState(() {
        geofenceState = data;
      });
    });

I'm unable to change state of my objects inside callback function as it's static function while my objects isn't static.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant