-
Notifications
You must be signed in to change notification settings - Fork 124
Pass parameters to the callback function #11
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
Comments
Since the periodicTaskFun function is a top-level function, parameters cannot be passed directly. Use a mobile database like sqlite. This is an example using sqflite. #9 (comment) |
Can you please go through this Object Box Issue. I have been trying to get the same instance of Store but as I'm making an instance from 2 different isolates the HashCodes are not the same because of which I'm not able to access the same store. |
I've checked the requirements, but there doesn't seem to be a way right now. I'll keep thinking about how to pass a SendPort or parameters. |
Yes, it would be of great help if we can send some parameters in the callback function or can communicate with the main isolate. |
So this was the solution I got from Internet and it's working now. But when I kill the app and reopen it, It's throwing me an error. Error:
Do you have any idea why this is happening? |
The above problem occurs if the |
So I checked the onDestroy function and it is working. But this error actually occurs when in the following steps:
Is this supposed to happen? |
objectbox/objectbox-dart@e61ea42 I tested with the above file and there was no problem. final _stepCountStream =
Stream<StepCount?>.periodic(const Duration(seconds: 10))
.asBroadcastStream(onCancel: (subscription) => subscription.cancel()); |
I tried this but nothing changed. I think there is some issue with flutter. |
Right now I'm using this code to register the callback function, but can I pass parameters like String or Int to periodicTaskFun? If not please can you add such a feature?
The text was updated successfully, but these errors were encountered: