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