WeekGenerator class
A class that implements a generator of a period type of a week.
- Mixed in types
Constructors
- WeekGenerator({int weekStart = DateTime.monday})
-
A class that implements a generator of a period type of a week.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - weekStart → int
-
The first day of the week.
final
Methods
-
after(
Period period, {Duration duration = const Duration(microseconds: 1)}) → WeekPeriod -
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.inherited -
before(
Period period, {Duration duration = const Duration(microseconds: 1)}) → WeekPeriod -
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.inherited -
fitsGenerator(
Period period) → bool -
Returns true if the given
period
fits the generator.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
of(
DateTime date) → WeekPeriod -
Returns the period of the given
date
considering the generator type.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override