WeekView<T extends Object?> class

Widget to display week view.

Inheritance

Constructors

WeekView({Key? key, EventController<T>? controller, EventTileBuilder<T>? eventTileBuilder, Duration pageTransitionDuration = const Duration(milliseconds: 300), Curve pageTransitionCurve = Curves.ease, double heightPerMinute = 1, double timeLineOffset = 0, bool showLiveTimeLineInAllDays = false, bool showVerticalLines = true, double? width, DateTime? minDay, DateTime? maxDay, DateTime? initialDay, HourIndicatorSettings? hourIndicatorSettings, CustomHourLinePainter? hourLinePainter, HourIndicatorSettings? halfHourIndicatorSettings, HourIndicatorSettings? quarterHourIndicatorSettings, DateWidgetBuilder? timeLineBuilder, double? timeLineWidth, LiveTimeIndicatorSettings? liveTimeIndicatorSettings, CalendarPageChangeCallBack? onPageChange, WeekPageHeaderBuilder? weekPageHeaderBuilder, EventArranger<T>? eventArranger, double weekTitleHeight = 50, DateWidgetBuilder? weekDayBuilder, WeekNumberBuilder? weekNumberBuilder, Color backgroundColor = Colors.white, double scrollOffset = 0.0, CellTapCallback<T>? onEventTap, CellTapCallback<T>? onEventLongTap, DatePressCallback? onDateLongPress, DateTapCallback? onDateTap, List<WeekDays> weekDays = WeekDays.values, bool showWeekends = true, WeekDays startDay = WeekDays.monday, MinuteSlotSize minuteSlotSize = MinuteSlotSize.minutes60, DetectorBuilder<Object?>? weekDetectorBuilder, StringProvider? headerStringBuilder, StringProvider? timeLineStringBuilder, String weekDayStringBuilder(int)?, String weekDayDateStringBuilder(int)?, HeaderStyle headerStyle = const HeaderStyle(), SafeAreaOption safeAreaOption = const SafeAreaOption(), FullDayEventBuilder<T>? fullDayEventBuilder, int startHour = 0, HeaderTitleCallback? onHeaderTitleTap, bool showHalfHours = false, bool showQuarterHours = false, double emulateVerticalOffsetBy = 0, bool showWeekDayAtBottom = false, ScrollPhysics? pageViewPhysics, CellTapCallback<T>? onEventDoubleTap, int endHour = Constants.hoursADay, String fullDayHeaderTitle = '', FullDayHeaderTextConfig? fullDayHeaderTextConfig, bool keepScrollOffset = false})
Main widget for week view.
const

Properties

backgroundColor Color
Background color of week view page.
final
controller EventController<T>?
Controller for Week view thia will refresh view when user adds or removes event from controller.
final
emulateVerticalOffsetBy double
Emulates offset of vertical line from hour line starts.
final
endHour int
This field will be used to set end hour for week view
final
eventArranger EventArranger<T>?
Arrange events.
final
eventTileBuilder EventTileBuilder<T>?
Builder to build tile for events.
final
fullDayEventBuilder FullDayEventBuilder<T>?
Display full day event builder.
final
fullDayHeaderTextConfig FullDayHeaderTextConfig?
Defines full day events header text config
final
fullDayHeaderTitle String
Title of the full day events row
final
halfHourIndicatorSettings HourIndicatorSettings?
Settings for half hour indicator settings.
final
hashCode int
The hash code for this object.
no setterinherited
headerStringBuilder StringProvider?
This function will generate dateString int the calendar header. Useful for I18n
final
headerStyle HeaderStyle
Style for WeekView header.
final
heightPerMinute double
Defines height occupied by one minute of time span. This parameter will be used to calculate total height of Week view.
final
hourIndicatorSettings HourIndicatorSettings?
Settings for hour indicator settings.
final
hourLinePainter CustomHourLinePainter?
A funtion that returns a CustomPainter.
final
initialDay DateTime?
Initial week to display in week view.
final
keepScrollOffset bool
Flag to keep scrollOffset of pages on page change
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
liveTimeIndicatorSettings LiveTimeIndicatorSettings?
Settings for live time indicator settings.
final
maxDay DateTime?
Maximum day to display in week view.
final
minDay DateTime?
Minimum day to display in week view.
final
minuteSlotSize MinuteSlotSize
Defines size of the slots that provides long press callback on area where events are not there.
final
onDateLongPress DatePressCallback?
This method will be called when user long press on calendar.
final
onDateTap DateTapCallback?
Called when user taps on day view page.
final
onEventDoubleTap CellTapCallback<T>?
Called when user double taps on any event tile.
final
onEventLongTap CellTapCallback<T>?
Called when user long press on event tile.
final
onEventTap CellTapCallback<T>?
Called when user taps on event tile.
final
onHeaderTitleTap HeaderTitleCallback?
Callback for the Header title
final
onPageChange CalendarPageChangeCallBack?
Called whenever user changes week.
final
pageTransitionCurve Curve
Transition curve for transition.
final
pageTransitionDuration Duration
duration for page transition while changing the week.
final
pageViewPhysics ScrollPhysics?
Defines scroll physics for a page of a week view.
final
quarterHourIndicatorSettings HourIndicatorSettings?
Settings for quarter hour indicator settings.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
safeAreaOption SafeAreaOption
Option for SafeArea.
final
scrollOffset double
Scroll offset of week view page.
final
showHalfHours bool
Show half hour indicator
final
showLiveTimeLineInAllDays bool
Flag to show live time indicator in all day or only initialDay
final
showQuarterHours bool
Show quarter hour indicator
final
showVerticalLines bool
If true this will display vertical lines between each day.
final
showWeekDayAtBottom bool
If true this will show week day at bottom position.
final
showWeekends bool
Show weekends or not
final
startDay WeekDays
Defines the day from which the week starts.
final
startHour int
First hour displayed in the layout, goes from 0 to 24
final
timeLineBuilder DateWidgetBuilder?
Builder for timeline.
final
timeLineOffset double
Offset of time line
final
timeLineStringBuilder StringProvider?
This function will generate the TimeString in the timeline. Useful for I18n
final
timeLineWidth double?
Width of time line.
final
weekDayBuilder DateWidgetBuilder?
Builder to build week day.
final
weekDayDateStringBuilder → (String Function(int)?)
This function will generate WeekDayDateString in the weekday. Useful for I18n
final
weekDays List<WeekDays>
Defines which days should be displayed in one week.
final
weekDayStringBuilder → (String Function(int)?)
This function will generate WeekDayString in the weekday. Useful for I18n
final
weekDetectorBuilder DetectorBuilder<Object?>?
Builds custom PressDetector widget
final
weekNumberBuilder WeekNumberBuilder?
Builder to build week number.
final
weekPageHeaderBuilder WeekPageHeaderBuilder?
Header builder for week page header.
final
weekTitleHeight double
Height of week day title,
final
width double?
Width of week view. If null provided device width will be considered.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() WeekViewState<T>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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