toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'trackingId': trackingId,
'smilingProbability': smilingProbability,
'mouthOpenProbability': mouthOpenProbability,
'headEulerAngleX': headEulerAngleX,
'headEulerAngleY': headEulerAngleY,
'headEulerAngleZ': headEulerAngleZ,
'leftEyeOpenProbability': leftEyeOpenProbability,
'rightEyeOpenProbability': rightEyeOpenProbability,
'boundingBox': {
'left': boundingBox.left,
'top': boundingBox.top,
'right': boundingBox.right,
'bottom': boundingBox.bottom,
'width': boundingBox.width,
'height': boundingBox.height,
},
'landmarks': landmarks
?.map((landmark) => {
'x': landmark.x,
'y': landmark.y,
'z': landmark.z,
})
.toList(),
'luminance': luminance,
};
}