ThemedCalendar class

Inheritance

Constructors

ThemedCalendar({Key? key, DateTime? focusDay, Map<String, String> translations = const {'layrz.calendar.year.back' : 'Previous year', 'layrz.calendar.year.next' : 'Next year', 'layrz.calendar.month.back' : 'Previous month', 'layrz.calendar.month.next' : 'Next month', 'layrz.calendar.week.back' : 'Previous week', 'layrz.calendar.week.next' : 'Next week', 'layrz.calendar.day.back' : 'Previous day', 'layrz.calendar.day.next' : 'Next day', 'layrz.calendar.today' : 'Today', 'layrz.calendar.year' : 'View as year', 'layrz.calendar.month' : 'View as month', 'layrz.calendar.week' : 'View as week', 'layrz.calendar.day' : 'View as day', 'layrz.calendar.view_as' : 'View as', 'layrz.calendar.pickMonth' : 'Pick a month'}, bool overridesLayrzTranslations = false, String dayFormat = '%A %B %Y', String weekFormat = '%B %Y', String monthFormat = '%B %Y', String yearFormat = '%Y', List<ThemedCalendarEntry> entries = const [], List<ThemedCalendarRangeEntry> rangeEntries = const [], List<DateTime> highlightedDays = const [], bool showEntries = true, void onDayTap(DateTime)?, bool isHighlightDaysAsRange = false, bool smallWeekdays = false, List<DateTime> disabledDays = const [], bool todayIndicator = true, bool todayButton = true, List<ThemedButton> aditionalButtons = const []})
const

Properties

aditionalButtons List<ThemedButton>
mode is the mode that the calendar will be displayed in. By default, the calendar will be displayed in ThemedCalendarMode.month mode. onModeChanged is a callback that will be called when the user changes the mode of the calendar. If onModeChanged is null, the calendar will not be able to change modes. ThemedCalendar is a widget that displays a calendar. To do:
final
dayFormat String
dayFormat is the format of the day. By default, we use %A %B %Y. For pattern equivalences, refer to DateTime extension format method included in Layrz Theme.
final
disabledDays List<DateTime>
disabledDays is the list of disabled days. Does not work when isHighlightDaysAsRange is true.
final
entries List<ThemedCalendarEntry>
entries is the list of entries that will be displayed in the calendar.
final
focusDay DateTime?
focusDay is the day that will be focused when the calendar is first displayed. If focusDay is null, the calendar will default to the current day.
final
hashCode int
The hash code for this object.
no setterinherited
highlightedDays List<DateTime>
highlightedDays is the list of days that will be highlighted in the calendar. When the calendar is in day or week, the highlight will consider the time-part of the dates.
final
isHighlightDaysAsRange bool
isHighlightDaysAsRange is the flag to highlight the days as a range. By default, the days will be highlighted as a single day using the default style
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
monthFormat String
monthFormat is the format of the month. By default, we use %B %Y. For pattern equivalences, refer to DateTime extension format method included in Layrz Theme.
final
onDayTap → (void Function(DateTime)?)
onDayTap is the callback that will be called when the user taps a day. If onDayTap is null, the days will not be tappable.
final
overridesLayrzTranslations bool
overridesLayrzTranslations is the flag to override the default translations of Layrz.
final
rangeEntries List<ThemedCalendarRangeEntry>
rangeEntries is the list of range entries that will be displayed in the calendar. A range entry is an entry that has a start date and an end date.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showEntries bool
showEntries is the flag to hide the entries in the calendar. By default, the entries will be displayed.
final
smallWeekdays bool
smallWeekdays is the flag to display the weekdays in a small size. By default, the weekdays will be displayed in a normal size.
final
todayButton bool
todayButton is the flag to display the today button. By default, the today button will be displayed.
final
todayIndicator bool
todayIndicator is the flag to display the today indicator. By default, the today indicator will be displayed.
final
translations Map<String, String>
translations is the translations of the calendar. By default we use LayrzAppLocalizations for translations, but you can submit your own translations using this property. Consider when LayrzAppLocalizations is present, is the default value of this property. Required translations:
final
weekFormat String
weekFormat is the format of the week. By default, we use %B %Y. For pattern equivalences, refer to DateTime extension format method included in Layrz Theme.
final
yearFormat String
yearFormat is the format of the year. By default, we use %Y. For pattern equivalences, refer to DateTime extension format method included in Layrz Theme.
final

Methods

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