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