tick method

Stream<int> tick({
  1. required int ticks,
})

Implementation

Stream<int> tick({required int ticks}) => Stream<int>.periodic(
      const Duration(seconds: 1),
      (int x) => ticks - x - 1,
    ).take(ticks);