CalendarTile class
CalendarTile is responsible for displaying one calendar event entry below the week view or the month view. The events are displayed in a list of CalendarTile.
Each CalendarTile has a set of properties:
onDateSelected is the callback function that gets invoked on tapping a date in the
calendar view. It has the type VoidCallback
date containes the current date to be rendered as DateTime type
dayOfWeek Contains the name of the weekday to be shown in the header row
isDayOfWeek is a bool, that gets used to deiced, if the tile shoulöd display a weekday or a date
isSelected is a bool, that contains the information, if the current tile ist the selected day
inMonth is a bool, that contains the information, if the current day belongs to the selected month
events contains a List<CleanCalendarEvents> of the events to display
dayOfWeekStyle this property alloes to set a text style for the week days in the header row
dateStyles this property alloes to set a text style for the date tiles
child can contain a Widget that can be displayed. If tihs property is null
, the
method renderDateOrDayOfWeek gets called, so the child property has priority.
selectedColor is a Color used for displaying the selected tile
todayColor is a Color object used to display the tile for today
eventColor can be used to color the dots in the calendar tile representing an event. The color, that
is set in the properties of the CleanCalendarEvent has priority over this parameter
eventDoneColor a Color object für displaying "done" events (events in the past)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- CalendarTile
Constructors
-
CalendarTile({VoidCallback? onDateSelected, DateTime? date, Widget? child, TextStyle? dateStyles, String? dayOfWeek, TextStyle? dayOfWeekStyle, bool isDayOfWeek = false, bool isSelected = false, bool inMonth = true, List<
CleanCalendarEvent> ? events, Color? selectedColor, Color? todayColor, Color? eventColor, Color? eventDoneColor})
Properties
- child → Widget?
-
final
- date → DateTime?
-
final
- dateStyles → TextStyle?
-
final
- dayOfWeek → String?
-
final
- dayOfWeekStyle → TextStyle?
-
final
- eventColor → Color?
-
final
- eventDoneColor → Color?
-
final
-
events
→ List<
CleanCalendarEvent> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inMonth → bool
-
final
- isDayOfWeek → bool
-
final
- isSelected → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onDateSelected → VoidCallback?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedColor → Color?
-
final
- todayColor → Color?
-
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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
-
renderDateOrDayOfWeek(
BuildContext context) → Widget - This function renderDateOrDayOfWeek renders the week view or the month view. It is responsible for displaying a calendar tile. This can be a day (i.e. "Mon", "Tue" ...) in the header row or a date tile for each day of a week or a month. The property isDayOfWeek of the CalendarTile decides, if the rendered item should be a day or a date tile.
-
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