TimerSignal constructor

TimerSignal({
  1. required Duration every,
  2. String debugLabel = 'Timer',
  3. bool? cancelOnError,
  4. bool autoDispose = false,
})

Emit recurring TimerSignalEvent aka AsyncSignal

Implementation

TimerSignal({
  required this.every,
  String super.debugLabel = 'Timer',
  super.cancelOnError,
  super.autoDispose,
}) : super(
        () => Stream<TimerSignalEvent>.periodic(
          every,
          (c) => _emit(c + 1),
        ),
        initialValue: _emit(0),
      );