toJson method

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

Implementation

@visibleForTesting
Map<String, dynamic> toJson() => {
      "imageIndex": imageIndex,
      "image": image.toJson(),
      "faces": faces.map((e) => e.toJson()).toList(),
      "error": error?.toJson(),
    }.clearNulls();