getByValue static method

Obstacle getByValue(
  1. int value
)

Implementation

static Obstacle getByValue(int value) {
  return Obstacle.values.firstWhere((x) => x.rawValue == value);
}