CalendarEvent class
A calendar event with a time range, color, and optional recurrence.
Supports all-day events, multi-day events, repeating rules, and reminders. Use occursOn to check whether the event falls on a given date.
Constructors
-
CalendarEvent({required String id, required String title, String? description, required DateTime startTime, required DateTime endTime, bool isAllDay = false, Color color = Colors.blue, String? icon, EventRepeat? repeat, EventReminder? reminder, String? location, List<
String> ? attendees, String? createdBy, Map<String, dynamic> ? extra}) -
const
Properties
-
attendees
→ List<
String> ? -
final
- color → Color
-
final
- createdBy → String?
-
final
- description → String?
-
final
- duration → Duration
-
The duration of the event from start to end.
no setter
- endTime → DateTime
-
final
-
extra
→ Map<
String, dynamic> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → String?
-
final
- id → String
-
final
- isAllDay → bool
-
final
- isMultiDay → bool
-
Whether the event spans more than one calendar day.
no setter
- location → String?
-
final
- reminder → EventReminder?
-
final
- repeat → EventRepeat?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startTime → DateTime
-
final
- title → String
-
final
Methods
-
copyWith(
{String? title, String? description, DateTime? startTime, DateTime? endTime, bool? isAllDay, Color? color, String? location}) → CalendarEvent -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
occursOn(
DateTime date) → bool -
Returns
trueif this event occurs on the givendate. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited