DriveCommand constructor

DriveCommand({
  1. double? throttle,
  2. double? left,
  3. double? right,
  4. bool? setLeft,
  5. bool? setRight,
  6. bool? setThrottle,
  7. double? frontSwivel,
  8. double? frontTilt,
  9. double? rearSwivel,
  10. double? rearTilt,
  11. RoverStatus? status,
  12. Version? version,
  13. ProtoColor? color,
  14. BoolState? blink,
})

Implementation

factory DriveCommand({
  $core.double? throttle,
  $core.double? left,
  $core.double? right,
  $core.bool? setLeft,
  $core.bool? setRight,
  $core.bool? setThrottle,
  $core.double? frontSwivel,
  $core.double? frontTilt,
  $core.double? rearSwivel,
  $core.double? rearTilt,
  $3.RoverStatus? status,
  $0.Version? version,
  ProtoColor? color,
  $1.BoolState? blink,
}) {
  final $result = create();
  if (throttle != null) {
    $result.throttle = throttle;
  }
  if (left != null) {
    $result.left = left;
  }
  if (right != null) {
    $result.right = right;
  }
  if (setLeft != null) {
    $result.setLeft = setLeft;
  }
  if (setRight != null) {
    $result.setRight = setRight;
  }
  if (setThrottle != null) {
    $result.setThrottle = setThrottle;
  }
  if (frontSwivel != null) {
    $result.frontSwivel = frontSwivel;
  }
  if (frontTilt != null) {
    $result.frontTilt = frontTilt;
  }
  if (rearSwivel != null) {
    $result.rearSwivel = rearSwivel;
  }
  if (rearTilt != null) {
    $result.rearTilt = rearTilt;
  }
  if (status != null) {
    $result.status = status;
  }
  if (version != null) {
    $result.version = version;
  }
  if (color != null) {
    $result.color = color;
  }
  if (blink != null) {
    $result.blink = blink;
  }
  return $result;
}