Implementation
factory MotorData({
$0.BoolState? isMoving,
$0.BoolState? isLimitSwitchPressed,
MotorDirection? direction,
$core.int? currentStep,
$core.int? targetStep,
$core.double? currentAngle,
$core.double? targetAngle,
}) {
final $result = create();
if (isMoving != null) {
$result.isMoving = isMoving;
}
if (isLimitSwitchPressed != null) {
$result.isLimitSwitchPressed = isLimitSwitchPressed;
}
if (direction != null) {
$result.direction = direction;
}
if (currentStep != null) {
$result.currentStep = currentStep;
}
if (targetStep != null) {
$result.targetStep = targetStep;
}
if (currentAngle != null) {
$result.currentAngle = currentAngle;
}
if (targetAngle != null) {
$result.targetAngle = targetAngle;
}
return $result;
}