dayFromInt function Null safety

Day? dayFromInt(
  1. int i
)

Implementation

Day? dayFromInt(int i) => [-1, 5].contains(i) ? null : Day.values[i];