toJson method

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

Implementation

@visibleForTesting
Map<String, dynamic> toJson() => {
      "detection": detection?.toJson(),
      "allDetections": allDetections?.map((e) => e.toJson()).toList(),
      "scenario": scenario?.value,
      "error": error?.toJson(),
    }.clearNulls();