getChapter method

Future<Chapter?> getChapter({
  1. required String id,
})

Returns the Chapter with the given id or null if this id does not exist.

Implementation

Future<Chapter?> getChapter({
  required String id,
}) async {
  Response<Chapter> chapters = await getChapters(
    idFilters: [
      Matches(id),
    ],
  );
  return chapters.docs.isNotEmpty ? chapters.docs.first : null;
}