TimerValue constructor

  1. @Assert('remaining >= 0', 'remaining should be greater than 0')
const TimerValue({
  1. required int remaining,
  2. required TimerUnit unit,
  3. @Default(TimerStatus.initial) TimerStatus status,
})

Implementation

@Assert('remaining >= 0', 'remaining should be greater than 0')
const factory TimerValue({
  /// The amount of `unit` that remains.
  required int remaining,

  /// The unit of the timer.
  required TimerUnit unit,

  /// The status of the timer.
  @Default(TimerStatus.initial) TimerStatus status,
}) = _TimerValue;