SwipeOptions.only constructor

const SwipeOptions.only({
  1. bool up = false,
  2. bool down = false,
  3. bool left = false,
  4. bool right = false,
})

If horizontal and vertical both are true/false then simply make the allDirections true.

Implementation

const SwipeOptions.only({
  this.up = false,
  this.down = false,
  this.left = false,
  this.right = false,
});