chapterWithContentResponseModelStateListFromJson function

List<ChapterWithContentResponseModelState> chapterWithContentResponseModelStateListFromJson(
  1. List? chapterWithContentResponseModelState, [
  2. List<ChapterWithContentResponseModelState>? defaultValue
])

Implementation

List<enums.ChapterWithContentResponseModelState>
    chapterWithContentResponseModelStateListFromJson(
  List? chapterWithContentResponseModelState, [
  List<enums.ChapterWithContentResponseModelState>? defaultValue,
]) {
  if (chapterWithContentResponseModelState == null) {
    return defaultValue ?? [];
  }

  return chapterWithContentResponseModelState
      .map((e) => chapterWithContentResponseModelStateFromJson(e.toString()))
      .toList();
}