Event.fromJson constructor

Event.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Event.fromJson(Map<String, dynamic> json) {
  return Event(
    date: timeStampFromJson(json['Date']),
    eventCategories: (json['EventCategories'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    message: json['Message'] as String?,
    sourceIdentifier: json['SourceIdentifier'] as String?,
    sourceType: (json['SourceType'] as String?)?.toSourceType(),
  );
}