Skip to content
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

[Bug Fixes] #45 | Map dynamic and string convertion issue for iOS fixed #47

Merged
merged 3 commits into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/ultralytics_yolo_platform_channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class PlatformChannelUltralyticsYolo implements UltralyticsYoloPlatform {
result = result as List;

for (dynamic json in result) {
objects.add(ClassificationResult.fromJson(Map<String, dynamic>.from (json as Map)));
objects.add(ClassificationResult.fromJson(
Map<String, dynamic>.from(json as Map)));
}

return objects;
Expand Down Expand Up @@ -131,7 +132,8 @@ class PlatformChannelUltralyticsYolo implements UltralyticsYoloPlatform {
final objects = <ClassificationResult>[];

result?.forEach((json) {
objects.add(ClassificationResult.fromJson(Map<String, dynamic>.from (json as Map)));
objects.add(ClassificationResult.fromJson(
Map<String, dynamic>.from(json as Map)));
});

return objects;
Expand All @@ -149,9 +151,9 @@ class PlatformChannelUltralyticsYolo implements UltralyticsYoloPlatform {
final objects = <DetectedObject>[];

result?.forEach((json) {
json = json as Map<String, dynamic>?;
json = json as Map<dynamic, dynamic>?;
glenn-jocher marked this conversation as resolved.
Show resolved Hide resolved
if (json == null) return;
objects.add(DetectedObject.fromJson(json as Map));
objects.add(DetectedObject.fromJson(json));
});

return objects;
Expand Down
Loading