TableCalendarCustomize<T> class
Highly customizable, feature-packed Flutter calendar with gestures, animations and multiple formats.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TableCalendarCustomize
Constructors
-
TableCalendarCustomize.new({Key? key, required DateTime focusedDay, required DateTime firstDay, required DateTime lastDay, DateTime? currentDay, dynamic locale, DateTime? rangeStartDay, DateTime? rangeEndDay, List<
int> weekendDays = const [DateTime.saturday, DateTime.sunday], CalendarFormat calendarFormat = CalendarFormat.month, Map<CalendarFormat, String> availableCalendarFormats = const {CalendarFormat.month : 'Month', CalendarFormat.twoWeeks : '2 weeks', CalendarFormat.week : 'Week'}, CalendarTypeMode calendarTypeMode = CalendarTypeMode.day, Map<CalendarTypeMode, String> availableCalendarTypeModes = const {CalendarTypeMode.day : 'Day', CalendarTypeMode.year : 'Year'}, bool headerVisible = true, bool daysOfWeekVisible = true, bool dividerVisible = true, bool pageJumpingEnabled = false, bool pageAnimationEnabled = true, bool sixWeekMonthsEnforced = false, bool shouldFillViewport = false, bool weekNumbersVisible = false, double rowHeight = 52.0, double daysOfWeekHeight = 16.0, Duration formatAnimationDuration = const Duration(milliseconds: 200), Curve formatAnimationCurve = Curves.linear, Duration pageAnimationDuration = const Duration(milliseconds: 300), Curve pageAnimationCurve = Curves.easeOut, StartingDayOfWeek startingDayOfWeek = StartingDayOfWeek.sunday, HitTestBehavior dayHitTestBehavior = HitTestBehavior.opaque, AvailableGestures availableGestures = AvailableGestures.all, SimpleSwipeConfig simpleSwipeConfig = const SimpleSwipeConfig(verticalThreshold: 25.0, swipeDetectionBehavior: SwipeDetectionBehavior.continuousDistinct), HeaderStyleCustomize headerStyle = const HeaderStyleCustomize(), DaysOfWeekStyleCustomize daysOfWeekStyle = const DaysOfWeekStyleCustomize(), CalendarStyleCustomize calendarStyle = const CalendarStyleCustomize(), CalendarBuildersCustomize<T> calendarBuilders = const CalendarBuildersCustomize(), YearCalendarStyleCustomize yearCalendarStyle = const YearCalendarStyleCustomize(), YearCalendarBuildersCustomize<T> yearCalendarBuilders = const YearCalendarBuildersCustomize(), RangeSelectionMode rangeSelectionMode = RangeSelectionMode.toggledOff, List<T> eventLoader(DateTime day)?, bool enabledDayPredicate(DateTime day)?, bool selectedDayPredicate(DateTime day)?, bool selectedYearPredicate(DateTime day)?, bool holidayPredicate(DateTime day)?, OnRangeSelected? onRangeSelected, OnDaySelected? onDaySelected, OnDaySelected? onDayLongPressed, void onDisabledDayTapped(DateTime day)?, void onDisabledDayLongPressed(DateTime day)?, void onHeaderTapped(DateTime focusedDay)?, void onHeaderLongPressed(DateTime focusedDay)?, void onPageChanged(DateTime focusedDay)?, void onFormatChanged(CalendarFormat format)?, void onTypeModeChanged(CalendarTypeMode typeMode)?, void onCalendarCreated(PageController pageController)?, void onDragEnd(CalendarFormat calendarFormat)?, void onTapItemTypeModeYear(int year)?}) -
Creates a
TableCalendarCustomize
widget.
Properties
-
availableCalendarFormats
→ Map<
CalendarFormat, String> -
Map
ofCalendarFormat
s andString
names associated with them. ThoseCalendarFormat
s will be used by internal logic to manage displayed format.final -
availableCalendarTypeModes
→ Map<
CalendarTypeMode, String> -
Map
ofCalendarTypeMode
s andString
names associated with them. ThoseCalendarTypeMode
s will be used by internal logic to manage displayed format.final - availableGestures → AvailableGestures
-
Specifies swipe gestures available to
TableCalendarCustomize
. IfAvailableGestures.none
is used, the calendar will only be interactive via buttons.final -
calendarBuilders
→ CalendarBuildersCustomize<
T> -
Set of custom builders for
TableCalendarCustomize
to work with. Use those to fully tailor the UI.final - calendarFormat → CalendarFormat
-
Specifies
TableCalendarCustomize
's current format.final - calendarStyle → CalendarStyleCustomize
-
Style for
TableCalendarCustomize
's content.final - calendarTypeMode → CalendarTypeMode
-
Specifies
TableCalendarCustomize
's current format.final - currentDay → DateTime?
-
DateTime that will be treated as today. Defaults to
DateTime.now()
.final - dayHitTestBehavior → HitTestBehavior
-
HitTestBehavior
for every day cell insideTableCalendarCustomize
.final - daysOfWeekHeight → double
-
Used for setting the height of
TableCalendarCustomize
's days of week row.final - daysOfWeekStyle → DaysOfWeekStyleCustomize
-
Style for days of week displayed between
TableCalendarCustomize
's header and content.final - daysOfWeekVisible → bool
-
Determines the visibility of the row of days of the week.
final
- dividerVisible → bool
-
Determines the visibility of divider under the row of days of the week.
final
- enabledDayPredicate → bool Function(DateTime day)?
-
Function deciding whether given day should be enabled or not.
If
false
is returned, this day will be disabled.final -
eventLoader
→ List<
T> Function(DateTime day)? -
Function that assigns a list of events to a specified day.
final
- firstDay → DateTime
-
The first active day of
TableCalendarCustomize
. Blocks swiping to days before it.final - focusedDay → DateTime
-
DateTime that determines which days are currently visible and focused.
final
- formatAnimationCurve → Curve
-
Specifies the curve of size animation that takes place whenever
calendarFormat
is changed.final - formatAnimationDuration → Duration
-
Specifies the duration of size animation that takes place whenever
calendarFormat
is changed.final - hashCode → int
-
The hash code for this object.
no setterinherited
- headerStyle → HeaderStyleCustomize
-
Style for
TableCalendarCustomize
's header.final - headerVisible → bool
-
Determines the visibility of calendar header.
final
- holidayPredicate → bool Function(DateTime day)?
-
Function deciding whether given day is treated as a holiday.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lastDay → DateTime
-
The last active day of
TableCalendarCustomize
. Blocks swiping to days after it.final - locale → dynamic
-
Locale to format
TableCalendarCustomize
dates with, for example:'en_US'
.final - onCalendarCreated → void Function(PageController pageController)?
-
Called when the calendar is created. Exposes its PageController.
final
- onDayLongPressed → OnDaySelected?
-
Called whenever any day gets long pressed.
final
- onDaySelected → OnDaySelected?
-
Called whenever any day gets tapped.
final
- onDisabledDayLongPressed → void Function(DateTime day)?
-
Called whenever any disabled day gets long pressed.
final
- onDisabledDayTapped → void Function(DateTime day)?
-
Called whenever any disabled day gets tapped.
final
- onDragEnd → void Function(CalendarFormat calendarFormat)?
-
Called when event drag end.
final
- onFormatChanged → void Function(CalendarFormat format)?
-
Called whenever
calendarFormat
is changed.final - onHeaderLongPressed → void Function(DateTime focusedDay)?
-
Called whenever header gets long pressed.
final
- onHeaderTapped → void Function(DateTime focusedDay)?
-
Called whenever header gets tapped.
final
- onPageChanged → void Function(DateTime focusedDay)?
-
Called whenever currently visible calendar page is changed.
final
- onRangeSelected → OnRangeSelected?
-
Called whenever a day range gets selected.
final
- onTapItemTypeModeYear → void Function(int year)?
-
Called when tap on item in Calendar (type mode: Year)
final
- onTypeModeChanged → void Function(CalendarTypeMode typeMode)?
-
Called whenever
calendarTypeMode
is changed.final - pageAnimationCurve → Curve
-
Specifies the curve of scrolling animation that takes place whenever the visible calendar page is changed.
final
- pageAnimationDuration → Duration
-
Specifies the duration of scrolling animation that takes place whenever the visible calendar page is changed.
final
- pageAnimationEnabled → bool
-
When set to true, updating the
focusedDay
will display a scrolling animation if the currently visible calendar page is changed.final - pageJumpingEnabled → bool
-
When set to true, tapping on an outside day in
CalendarFormat.month
format will jump to the calendar page of the tapped month.final - rangeEndDay → DateTime?
-
The end of the selected day range.
final
- rangeSelectionMode → RangeSelectionMode
-
Current mode of range selection.
final
- rangeStartDay → DateTime?
-
The start of the selected day range.
final
- rowHeight → double
-
Used for setting the height of
TableCalendarCustomize
's rows.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedDayPredicate → bool Function(DateTime day)?
-
Function deciding whether given day should be marked as selected.
final
- selectedYearPredicate → bool Function(DateTime day)?
-
Function deciding whether given day should be marked as selected.
final
- shouldFillViewport → bool
-
When set to true,
TableCalendarCustomize
will fill available height.final - simpleSwipeConfig → SimpleSwipeConfig
-
Configuration for vertical swipe detector.
final
- sixWeekMonthsEnforced → bool
-
When set to true,
CalendarFormat.month
will always display six weeks, even if the content would fit in less.final - startingDayOfWeek → StartingDayOfWeek
-
TableCalendarCustomize
will start weeks with provided day.final -
weekendDays
→ List<
int> -
List of days treated as weekend days.
Use built-in
DateTime
weekday constants (e.g.DateTime.monday
) instead ofint
literals (e.g.1
).final - weekNumbersVisible → bool
-
Whether to display week numbers on calendar.
final
-
yearCalendarBuilders
→ YearCalendarBuildersCustomize<
T> -
Set of custom builders for
YearTableCalendarCustomize
to work with. Use those to fully tailor the UI.final - yearCalendarStyle → YearCalendarStyleCustomize
-
Style for
TableCalendarCustomize
's content.final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _TableCalendarCustomizeState< 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, int wrapWidth = 65}) → 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