Week class

Constructors

Week({required int year, required int weekNumber})
const
Week.current()
Return the current week.
factory
Week.fromDate(DateTime date)
Return the week that contains the given date.
factory
Week.fromISOString(String isoString)
Return a week initialized from an ISO formatted string like "2020W01" or "2020-W01" (or even "2020-W1" or "2020W1").
factory

Properties

days List<DateTime>
Return a list of all days in the week.
no setter
hashCode int
The hash code for this object.
no setterinherited
next Week
Return the next week.
no setter
previous Week
Return the week before.
no setter
props List<Object>
The list of properties that will be used to determine whether two instances are equal.
no setter
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
weekNumber int
final
year int
final

Methods

addWeeks(int weeks) Week
Return the week that many number of weeks into the future.
day(int day) DateTime
Return a day of the week as a DateTime object based on the provided day index. Day 0 is Monday.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
subtractWeeks(int weeks) Week
Return the week that many number of weeks in the past.
toString() String
Return an ISO formatted string like "2020W01".

Operators

operator ==(Object other) bool
The equality operator.
inherited