notificationTypeDTONullableFromJson function

NotificationTypeDTO? notificationTypeDTONullableFromJson(
  1. Object? notificationTypeDTO, [
  2. NotificationTypeDTO? defaultValue
])

Implementation

enums.NotificationTypeDTO? notificationTypeDTONullableFromJson(
  Object? notificationTypeDTO, [
  enums.NotificationTypeDTO? defaultValue,
]) {
  if (notificationTypeDTO == null) {
    return null;
  }
  return enums.NotificationTypeDTO.values
          .firstWhereOrNull((e) => e.value == notificationTypeDTO) ??
      defaultValue;
}