CalendarMonthEvent class
Represents a single event displayed on the calendar month grid. This is the public facing event model for the library.
Constructors
- CalendarMonthEvent({required String id, required DateTime startDate, required DateTime endDate, required String title, required Color background, String? iconUrl, required Color textColor, bool isReadOnly = false})
- Creates a new instance of CalendarMonthEvent.
-
CalendarMonthEvent.fromJson(Map<
String, dynamic> json) -
Factory constructor to create a CalendarMonthEvent from a JSON map.
It handles parsing ISO date strings and hex color codes.
factory
Properties
- background → Color
-
The background color of the event.
final
- endDate → DateTime
-
The end date of the event.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconUrl → String?
-
The URL of the icon for the event.
final
- id → String
-
The unique identifier of the event.
final
- isReadOnly → bool
-
Whether the event is read-only.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startDate → DateTime
-
The start date of the event.
final
- textColor → Color
-
The text color of the event.
final
- title → String
-
The title of the event.
final
Methods
-
copyWith(
{String? id, DateTime? startDate, DateTime? endDate, String? title, Color? background, String? iconUrl, Color? textColor, bool? isReadOnly}) → CalendarMonthEvent - Creates a copy of this event with the given fields updated.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited