toJson method
Implementation
@visibleForTesting
Map<String, dynamic> toJson() => {
"image": _bytesToBase64(image),
"liveness": liveness.value,
"tag": tag,
"transactionId": transactionId,
"estimatedAge": estimatedAge,
"error": error?.toJson(),
}.clearNulls();