goDirection method

Future<void> goDirection(
  1. DriveDirection direction
)

Implementation

Future<void> goDirection(DriveDirection direction) async => switch (direction) {
  DriveDirection.forward => await goForward(),
  DriveDirection.left => await turnLeft(),
  DriveDirection.right => await turnRight(),
  DriveDirection.stop => await stop(),
};