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