toJson method

  1. @visibleForTesting
Map<String, dynamic> toJson()

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();