23 lines
569 B
Dart
23 lines
569 B
Dart
class CalendarEventEntry {
|
|
const CalendarEventEntry({
|
|
required this.date,
|
|
required this.title,
|
|
required this.description,
|
|
required this.category,
|
|
});
|
|
|
|
final DateTime date;
|
|
final String title;
|
|
final String description;
|
|
final String category;
|
|
|
|
factory CalendarEventEntry.fromJson(Map<String, dynamic> json) {
|
|
return CalendarEventEntry(
|
|
date: DateTime.parse(json['date'].toString()),
|
|
title: json['title'].toString(),
|
|
description: json['description'].toString(),
|
|
category: json['category'].toString(),
|
|
);
|
|
}
|
|
}
|