toJson method

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

Implementation

@visibleForTesting
Map<String, dynamic> toJson() => {
      "quality": quality?.map((e) => e.toJson()).toList(),
      "crop": _bytesToBase64(crop),
      "attributes": attributes?.map((e) => e.toJson()).toList(),
      "landmarks": landmarks?.map((e) => e.toJson()).toList(),
      "faceRect": faceRect?.toJson(),
      "originalRect": originalRect?.toJson(),
      "isQualityCompliant": isQualityCompliant,
    }.clearNulls();