You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform channels can be used as well but must be implemented for each platform separately which is not ideal. Also Java API passes a limited set of events and data
In first two scenarios libzt must be built with ZTS_C_API_ONLY defined (build script needs a fix for that) or else Android build will use JNI callback which is just two ints.
The text was updated successfully, but these errors were encountered:
Asynchronous callbacks with void returns can now be done with NativeCallable.listener from Dart 3.1.
This is great news, thank you. I hope I will find some time to finally implement it. For now I personally just poll network statuses every 50 ms or so.
libzt
provides a way to pass a callback method that is called from background thread when an event happens.The problem is that Dart and Flutter do not support invoking into isolate thread.
The ways to work that around:
Fork
libzt
and useDart_Port
as explained hereWait for Dart team to implement calls from background threads
Platform channels can be used as well but must be implemented for each platform separately which is not ideal. Also Java API passes a limited set of events and data
In first two scenarios
libzt
must be built withZTS_C_API_ONLY
defined (build script needs a fix for that) or else Android build will use JNI callback which is just two ints.The text was updated successfully, but these errors were encountered: