Debounce constructor

Debounce({
  1. required int initial,
  2. required int cap,
})

Creates a Debounce with the given initial value and cap. Both the initial value and cap should be milliseconds greater than 0.

Implementation

Debounce({required this.initial, required this.cap}):
    assert(initial <= cap, 'Initial value ($initial) should be <= cap ($cap)'),
    assert(initial > 0, 'Initial value ($initial) should be > 0'),
    assert(cap <= 8589934592, 'Cap ($cap) should be <= (2^32) * 2');