ChaptersModel.fromMap constructor

ChaptersModel.fromMap(
  1. Map<String, dynamic> data
)

Implementation

factory ChaptersModel.fromMap(Map<String, dynamic> data) => ChaptersModel(
      totalcount: data['totalcount'] as int?,
      data: (data['data'] as List<dynamic>?)
          ?.map((e) => ChapterDatum.fromMap(e as Map<String, dynamic>))
          .toList(),
    );