EventContext.fromJson constructor

EventContext.fromJson(
  1. Map<String, Object?> json
)

Implementation

EventContext.fromJson(Map<String, Object?> json)
    : end = ((v) => v != null ? v as String : null)(json['end']),
      event = ((v) => v != null
          ? SDNEvent.fromJson(v as Map<String, Object?>)
          : null)(json['event']),
      eventsAfter = ((v) => v != null
          ? (v as List)
              .map((v) => SDNEvent.fromJson(v as Map<String, Object?>))
              .toList()
          : null)(json['events_after']),
      eventsBefore = ((v) => v != null
          ? (v as List)
              .map((v) => SDNEvent.fromJson(v as Map<String, Object?>))
              .toList()
          : null)(json['events_before']),
      start = ((v) => v != null ? v as String : null)(json['start']),
      state = ((v) => v != null
          ? (v as List)
              .map((v) => SDNEvent.fromJson(v as Map<String, Object?>))
              .toList()
          : null)(json['state']);