-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Unhandled Exception: type '_Map<Object?, Object?>' is not a subtype of type 'Map<String, dynamic>?' in type cast when casting json. #5
Comments
Hello there! Thanks for reporting this issue and diving into the details. It sounds like you've encountered a type casting challenge that's common with dynamic languages. Your solution If you have further questions or run into more issues, feel free to reach out or check our docs at https://docs.ultralytics.com for guidance. Happy coding! 😊👍 |
"type '_Map<Object?, Object?>' is not a subtype of type 'Map<String, dynamic>' in type cast"
Fix: |
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help. For additional resources and information, please see the links below:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed! Thank you for your contributions to YOLO 🚀 and Vision AI ⭐ |
It throws an error:
Unhandled Exception: type '_Map<Object?, Object?>' is not a subtype of type 'Map<String, dynamic>?' in type cast
when I called detect function as the following code:
I tried digging into the package code, at
~\AppData\Local\Pub\Cache\hosted\pub.dev\ultralytics_yolo-0.0.3\lib\ultralytics_yolo_platform_channel.dart
, I found this line of code throwing the error:I tried modifying the code to:
json = Map<String, dynamic>.from (json as Map);
, then the error disappeared.So, is this the bug from package or due to the mismatch between flutter/dart environment and the package ?
The text was updated successfully, but these errors were encountered: