NotificationSchemeEvent.fromJson constructor

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

Implementation

factory NotificationSchemeEvent.fromJson(Map<String, Object?> json) {
  return NotificationSchemeEvent(
    event: json[r'event'] != null
        ? NotificationEvent.fromJson(json[r'event']! as Map<String, Object?>)
        : null,
    notifications: (json[r'notifications'] as List<Object?>?)
            ?.map((i) => EventNotification.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}