execute method

  1. @override
String execute()
override

Implementation

@override
String execute() {
  var flipDirection;
  switch (direction) {
    case FlipDirection.back:
      flipDirection = "b";
      break;
    case FlipDirection.front:
      flipDirection = "f";
      break;
    case FlipDirection.left:
      flipDirection = "l";
      break;
    case FlipDirection.right:
      flipDirection = "r";
      break;
    default:
      flipDirection = "f";
      break;
  }

  return "flip ${flipDirection}";
}