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