Closed knight0zh closed 1 month ago
The send function can only send primitive type, String, Collection provided by Flutter.
If you want to send a custom object, send it in String format using jsonEncode and jsonDecode.
JSON and serialization >> https://docs.flutter.dev/data-and-backend/serialization/json
The parameter transfer of the new version of sendPort. send is restricted, and I am unable to implement the step counting function. Please tell me what to do?
Error
E/flutter (14899): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument: is a regular instance reachable via : Instance of 'StepCount'