29 lines
745 B
Dart
29 lines
745 B
Dart
import 'convocation.dart';
|
|
|
|
class EventDetail {
|
|
final String title;
|
|
final String type;
|
|
final String place;
|
|
final String timeStart;
|
|
final String timeEnd;
|
|
final Convocation convocation;
|
|
|
|
EventDetail({
|
|
required this.title,
|
|
required this.type,
|
|
required this.place,
|
|
required this.timeStart,
|
|
required this.timeEnd,
|
|
required this.convocation,
|
|
});
|
|
|
|
factory EventDetail.fromJson(Map<String, dynamic> json) => EventDetail(
|
|
title: json['title'] as String,
|
|
type: json['type'] as String,
|
|
place: json['place'] as String? ?? '',
|
|
timeStart: json['time_start'] as String,
|
|
timeEnd: json['time_end'] as String,
|
|
convocation: Convocation.fromJson(json['convocation'] as Map<String, dynamic>),
|
|
);
|
|
}
|