Jitter constructor

Jitter({
  1. int minInSeconds = 0,
  2. required int maxInSeconds,
})

Returns the new instance of Jitter.

Implementation

Jitter({this.minInSeconds = 0, required this.maxInSeconds}) {
  if (minInSeconds < 0) {
    throw ArgumentError.value(
      minInSeconds,
      'minInSeconds',
      'must be greater than or equal to 0',
    );
  }

  if (maxInSeconds < 0) {
    throw ArgumentError.value(
      maxInSeconds,
      'maxInSeconds',
      'must be greater than or equal to 0',
    );
  }

  if (maxInSeconds < minInSeconds) {
    throw ArgumentError('minInSeconds must not be greater than maxInSeconds');
  }
}