PeriodGenerator<T extends Period>
enum
An enumeration of the different period generators implemented in this package.
- Inheritance
- Mixed-in types
- Available extensions
Values
-
second
→ const PeriodGenerator<
SecondPeriod> -
Creates periods of a second.
const PeriodGenerator(SecondGenerator()) -
minute
→ const PeriodGenerator<
MinutePeriod> -
Creates periods of a minute.
const PeriodGenerator(MinuteGenerator()) -
hour
→ const PeriodGenerator<
HourPeriod> -
Creates periods of an hour.
const PeriodGenerator(HourGenerator()) -
day
→ const PeriodGenerator<
DayPeriod> -
Creates periods of a day.
const PeriodGenerator(DayGenerator()) -
week
→ const PeriodGenerator<
WeekPeriod> -
Creates periods of a week.
const PeriodGenerator(WeekGenerator()) -
fortnight
→ const PeriodGenerator<
FortnightPeriod> -
Creates periods of a fortnight.
const PeriodGenerator(FortnightGenerator()) -
month
→ const PeriodGenerator<
MonthPeriod> -
Creates periods of a month.
const PeriodGenerator(MonthGenerator()) -
trimester
→ const PeriodGenerator<
TrimesterPeriod> -
Creates periods of a trimester.
const PeriodGenerator(TrimesterGenerator()) -
semester
→ const PeriodGenerator<
SemesterPeriod> -
Creates periods of a semester.
const PeriodGenerator(SemesterGenerator()) -
year
→ const PeriodGenerator<
YearPeriod> -
Creates periods of a year.
const PeriodGenerator(YearGenerator())
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
after(
Period period, {Duration duration = const Duration(microseconds: 1)}) → T -
Returns the period after the given
periodby the rule: The Period.end is given to this of. The givendurationis added to the end of the resulting period and this is given to of.inherited -
before(
Period period, {Duration duration = const Duration(microseconds: 1)}) → T -
Returns the period before the given
periodby the rule: The Period.start is given to this of. The givendurationis subtracted from the start of the resulting period and this is given to of.inherited -
fitsGenerator(
Period period) → bool -
Returns true if the given
periodfits the generator.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
of(
DateTime date) → T -
Returns the period of the given
dateconsidering the generator type.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
PeriodGenerator< Period> > - A constant List of the values in this enum, in order of their declaration.