webApiIncludeExcludeAllNullableFromJson function

WebApiIncludeExcludeAll? webApiIncludeExcludeAllNullableFromJson(
  1. Object? webApiIncludeExcludeAll, [
  2. WebApiIncludeExcludeAll? defaultValue
])

Implementation

enums.WebApiIncludeExcludeAll? webApiIncludeExcludeAllNullableFromJson(
  Object? webApiIncludeExcludeAll, [
  enums.WebApiIncludeExcludeAll? defaultValue,
]) {
  if (webApiIncludeExcludeAll == null) {
    return null;
  }
  return enums.WebApiIncludeExcludeAll.values.firstWhereOrNull(
        (e) => e.value == webApiIncludeExcludeAll,
      ) ??
      defaultValue;
}