Skip to content

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

interval pub packageBuild Status

Provides the Interval 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.

##Install

pub global activate den # If you haven't already
den install interval

##Usage

import'package:interval/interval.dart';
// Date intervalsvar activeDates =newInterval<DateTime>.closed(date1, date2);
if(activeDates.contains(newDateTime.now()) {
print('Item is active!');
}
// View selection modelvar slider =newSlider(interval:newInterval.closed(0, 100));
// ValidationclassRating {
finalint value;
Rating(this.value) {
if(!newInterval.closed(1, 5).contains(value)) {
thrownewArgumentError('ratings must be between 1 and 5');
}
}
}

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages