NotificationSchemeEventDetails.fromJson constructor

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

Implementation

factory NotificationSchemeEventDetails.fromJson(Map<String, Object?> json) {
  return NotificationSchemeEventDetails(
    event: NotificationSchemeEventTypeId.fromJson(
        json[r'event'] as Map<String, Object?>? ?? const {}),
    notifications: (json[r'notifications'] as List<Object?>?)
            ?.map((i) => NotificationSchemeNotificationDetails.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}