toJson method
Implementation
@visibleForTesting
Map<String, dynamic> toJson() => {
"results": results.map((e) => e.toJson()).toList(),
"detections": detections.map((e) => e.toJson()).toList(),
"tag": tag,
"error": error?.toJson(),
}.clearNulls();