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
Do you also have the code for your Todo class?
This seems to be caused by calling compute in the calculateDiff function in meyers_diff.dart. It is a wrapper for using isolates and you can only send some datatypes to them because they have to be serialized.
From the documentation of compute:
There are limitations on the values that can be sent and received to and from isolates.
These limitations constrain the values of Q and R that are possible. See the discussion at SendPort.send.
and of send
The content of message can be: primitive values (null, num, bool, double, String), instances of SendPort, and lists and maps whose elements are any of these. List and maps are also allowed to be cyclic.
In the special circumstances when two isolates share the same code and are running in the same process (e.g. isolates created via Isolate.spawn), it is also possible to send object instances (which would be copied in the process). This is currently only supported by the dart vm.
So maybe it's a problem if you have any closures (such as final Function onCompleted) in your Todo class.
Also, does it work if you set the equals parameter? Because for me it doesn't, which may be caused by the same issue. I think, that #2 can't be fixed because of this either, I tried it and got the same error, likely, because I can't pass a templated closure to the isolate via _DiffArguments<E>.
I have the following issue:
it comes from an adaptation of the example code, using my own Todo class:
any ideas?
The text was updated successfully, but these errors were encountered: