toJson method

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

Implementation

@visibleForTesting
Map<String, dynamic> toJson() => {
      "scenario": scenario?.value,
      "onlineProcessingConfig": onlineProcessingConfig?.toJson(),
      "oneShotIdentification": oneShotIdentification,
      "livePortrait": _bytesToBase64(livePortrait),
      "extPortrait": _bytesToBase64(extPortrait),
      "image": _bytesToBase64(image),
      "data": _bytesToBase64(data),
      "images": images?.map((e) => _bytesToBase64(e)).toList(),
      "imageInputData": imageInputData?.map((e) => e.toJson()).toList(),
    }.clearNulls();