AsxCalendar<T> class

Highly customizable, feature-packed Flutter calendar with gestures, animations and multiple formats.

Inheritance

Constructors

AsxCalendar({Key? key, required DateTime focusedDay, required DateTime firstDay, required DateTime lastDay, DateTime? currentDay, dynamic locale, List<int> weekendDays = const [DateTime.saturday, DateTime.sunday], bool headerVisible = true, bool daysOfWeekVisible = true, bool pageAnimationEnabled = true, bool shouldFillViewport = false, double rowHeight = 52.0, double daysOfWeekHeight = 16.0, VoidCallback? onHeaderTapped, Duration pageAnimationDuration = const Duration(milliseconds: 300), Curve pageAnimationCurve = Curves.easeOut, StartingDayOfWeek startingDayOfWeek = StartingDayOfWeek.monday, HitTestBehavior dayHitTestBehavior = HitTestBehavior.opaque, AvailableGestures availableGestures = AvailableGestures.all, SimpleSwipeConfig simpleSwipeConfig = const SimpleSwipeConfig(verticalThreshold: 25.0, swipeDetectionBehavior: SwipeDetectionBehavior.continuousDistinct), HeaderStyle headerStyle = const HeaderStyle(), DaysOfWeekStyle daysOfWeekStyle = const DaysOfWeekStyle(), CalendarStyle calendarStyle = const CalendarStyle(), CalendarBuilders<T> calendarBuilders = const CalendarBuilders(), bool selectedDayPredicate(DateTime day)?, OnDaySelected? onDaySelected, void onPageChanged(DateTime focusedDay)?, void onCalendarCreated(PageController pageController)?})
Creates a TableCalendar widget.

Properties

availableGestures AvailableGestures
Specifies swipe gestures available to TableCalendar. If AvailableGestures.none is used, the calendar will only be interactive via buttons.
final
calendarBuilders CalendarBuilders<T>
Set of custom builders for TableCalendar to work with. Use those to fully tailor the UI.
final
calendarStyle CalendarStyle
Style for TableCalendar's content.
final
currentDay DateTime?
DateTime that will be treated as today. Defaults to DateTime.now().
final
dayHitTestBehavior HitTestBehavior
HitTestBehavior for every day cell inside TableCalendar.
final
daysOfWeekHeight double
Used for setting the height of TableCalendar's days of week row.
final
daysOfWeekStyle DaysOfWeekStyle
Style for days of week displayed between TableCalendar's header and content.
final
daysOfWeekVisible bool
Determines the visibility of the row of days of the week.
final
firstDay DateTime
The first active day of TableCalendar. Blocks swiping to days before it.
final
focusedDay DateTime
DateTime that determines which days are currently visible and focused.
final
hashCode int
The hash code for this object.
no setterinherited
headerStyle HeaderStyle
Style for TableCalendar's header.
final
headerVisible bool
Determines the visibility of calendar header.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lastDay DateTime
The last active day of TableCalendar. Blocks swiping to days after it.
final
locale → dynamic
Locale to format TableCalendar dates with, for example: 'en_US'.
final
onCalendarCreated → (void Function(PageController pageController)?)
Called when the calendar is created. Exposes its PageController.
final
onDaySelected OnDaySelected?
Called whenever any day gets tapped.
final
onHeaderTapped VoidCallback?
final
onPageChanged → (void Function(DateTime focusedDay)?)
Called whenever currently visible calendar page 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
rowHeight double
Used for setting the height of TableCalendar'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
shouldFillViewport bool
When set to true, TableCalendar will fill available height.
final
simpleSwipeConfig → SimpleSwipeConfig
Configuration for vertical swipe detector.
final
startingDayOfWeek StartingDayOfWeek
TableCalendar 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 of int literals (e.g. 1).
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _AsxCalendarState<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