MotorData constructor

MotorData({
  1. BoolState? isMoving,
  2. BoolState? isLimitSwitchPressed,
  3. MotorDirection? direction,
  4. int? currentStep,
  5. int? targetStep,
  6. double? angle,
})

Implementation

factory MotorData({
  $1.BoolState? isMoving,
  $1.BoolState? isLimitSwitchPressed,
  MotorDirection? direction,
  $core.int? currentStep,
  $core.int? targetStep,
  $core.double? angle,
}) {
  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 (angle != null) {
    $result.angle = angle;
  }
  return $result;
}