WeekIndexCalculator class Views
Calculates page indices and date ranges for a week view.
- Inheritance
-
- Object
- PageIndexCalculator
- WeekIndexCalculator
Constructors
- WeekIndexCalculator({required DateTime start, required DateTime end, required int firstDayOfWeek, required int daysToDisplay})
- WeekIndexCalculator.week({required DateTime start, required DateTime end, required int firstDayOfWeek})
- Creates a WeekIndexCalculator for a standard week view.
- WeekIndexCalculator.workWeek({required DateTime start, required DateTime end})
- Creates a WeekIndexCalculator for a work week view.
Properties
- daysToDisplay → int
-
The number of days to display in a week view. Usually 7.
final
- end → DateTime
-
The end of the range this calculator operates within.
finalinherited
- firstDayOfWeek → int
-
The value to shift the start of week by to get the first day of the week.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → DateTime
-
The start of the range, before a view aligns it to its page boundaries. See floatingRange.
finalinherited
Methods
-
floatingRange(
Location? location) → FloatingDateTimeRange -
The adjusted range for a specific location.
override
-
indexFromDate(
DateTime date, Location? location) → int -
Calculates the page index of the
date.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
numberOfPages(
Location? location) → int -
The number of pages that can be displayed.
override
-
rangeFromDate(
FloatingDateTime date, Location? location) → FloatingDateTimeRange -
Returns the range that is displayed for the given
date.inherited -
rangeFromIndex(
int index, Location? location) → FloatingDateTimeRange -
Calculates the VisibleDateRange from the
index.override -
rawRange(
Location? location) → FloatingDateTimeRange -
start and end resolved into
location, before a view adjusts them to its own page boundaries.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override