CalibrationInfo constructor
CalibrationInfo(
- Map event
Creates a CalibrationInfo instance using the provided event data.
The event
should be a map containing raw data from a CalibrationEvent.
This constructor extracts and assigns the relevant data fields to the corresponding properties.
Implementation
CalibrationInfo(Map<dynamic, dynamic> event) {
_setCalibrationType(event);
// Set relevant data fields based on the type of calibration event.
if (type == CalibrationType.CALIBRATION_NEXT_XY) {
_setCalibrationNextXY(event);
} else if (type == CalibrationType.CALIBRATION_PROGRESS) {
_setCalibrationProgress(event);
} else if (type == CalibrationType.CALIBRATION_FINISHED) {
_setCalibrationFinished(event);
}
}