mirror of
https://github.com/Iconica-Development/flutter_agenda.git
synced 2025-05-18 21:03:45 +02:00
26 lines
640 B
Dart
26 lines
640 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class AgendaEvent {
|
|
/// The model used for a single event in the [AgendaWidget].
|
|
/// AgendaEvent can be multiple days long.
|
|
AgendaEvent({
|
|
required this.start,
|
|
required this.end,
|
|
this.id,
|
|
this.content,
|
|
}) : assert(start.isBefore(end), 'start must be before end');
|
|
|
|
/// The start time of the event.
|
|
final DateTime start;
|
|
|
|
/// The end time of the event.
|
|
final DateTime end;
|
|
|
|
///
|
|
final Widget? content;
|
|
|
|
/// The identifier of the event that is used to combine events
|
|
/// with the same id. Leave empty or 0 if you don't want to combine events.
|
|
final int? id;
|
|
}
|