chapterWithContentResponseModelStateNullableFromJson function

ChapterWithContentResponseModelState? chapterWithContentResponseModelStateNullableFromJson(
  1. Object? chapterWithContentResponseModelState, [
  2. ChapterWithContentResponseModelState? defaultValue
])

Implementation

enums.ChapterWithContentResponseModelState?
    chapterWithContentResponseModelStateNullableFromJson(
  Object? chapterWithContentResponseModelState, [
  enums.ChapterWithContentResponseModelState? defaultValue,
]) {
  if (chapterWithContentResponseModelState == null) {
    return null;
  }
  return enums.ChapterWithContentResponseModelState.values.firstWhereOrNull(
          (e) => e.value == chapterWithContentResponseModelState) ??
      defaultValue;
}