toJson method
Implementation
Map toJson() {
Map _result = {};
if (faceIndex != null) _result.addAll({"faceIndex": faceIndex});
if (rotationAngle != null) _result.addAll({"rotationAngle": rotationAngle});
if (!landmarks.isEmpty) {
var list = [];
for (var item in landmarks) list.add(item!.toJson());
_result.addAll({"landmarks": list});
}
if (faceRect != null) _result.addAll({"faceRect": faceRect!.toJson()});
if (originalRect != null)
_result.addAll({"originalRect": originalRect!.toJson()});
if (crop != null) _result.addAll({"crop": crop});
return _result;
}