Files
Hacki/lib/extensions/int_extension.dart
Jiaqi Feng 747491944f v0.2.7 (#20)
* added onboard flow.

* bumped version.

* fixed onboard view.

* fixed prefs.

* bumped version.

* optimized cache service.

* updated pubspec.yaml

* bumped version.

* fixed onboard view.

* fixed lint.

* fixed padding.

* bumped version.
2022-05-20 21:59:06 -07:00

6 lines
254 B
Dart

extension IntExtension on int {
Iterable<int> to(int other, {bool inclusive = true}) => other > this
? <int>[for (int i = this; i < other; i++) i, if (inclusive) other]
: <int>[for (int i = this; i > other; i--) i, if (inclusive) other];
}