xrange 0.0.2 copy "xrange: ^0.0.2" to clipboard
xrange: ^0.0.2 copied to clipboard

outdated

Provdes a Range class, a contiguous set of values.

This is a fork of Interval library

XRange lib #

Provides the Range class, a contiguous set of values.

If an Interval contains two values, it also contains all values between them. It may have an upper and lower bound, and those bounds may be open or closed.

Usage #

import 'package:xrange/range.dart';

void main() {
  final date1 = DateTime(2015);
  final date2 = DateTime(2021);
  final dates = Range<DateTime>.closed(date1, date2);

  if (dates.contains(DateTime.now())) {
    print('Hi, contemporary!');
  } else {
    print('Apparently, you are from the future!');
  }
}
3
likes
0
points
829
downloads

Publisher

unverified uploader

Weekly Downloads

Provdes a Range class, a contiguous set of values.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on xrange