PeriodGeneratorMixin<T extends Period> mixin
A mixin for generating period types.
If you are looking for implementations, see PeriodGenerator and its values: SecondGenerator, MinuteGenerator, HourGenerator, DayGenerator, WeekGenerator, FortnightGenerator, MonthGenerator, TrimesterGenerator, SemesterGenerator and YearGenerator.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
period
by the rule: The Period.end is given to this of. The givenduration
is added to the end of the resulting period and this is given to of. -
before(
Period period, {Duration duration = const Duration(microseconds: 1)}) → T -
Returns the period before the given
period
by the rule: The Period.start is given to this of. The givenduration
is subtracted from the start of the resulting period and this is given to of. -
fitsGenerator(
Period period) → bool -
Returns true if the given
period
fits the generator. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
of(
DateTime date) → T -
Returns the period of the given
date
considering the generator type. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited