Improve comic chapters.

This commit is contained in:
2025-02-20 13:08:55 +08:00
parent 2b3c7a8564
commit bd5d10e919
14 changed files with 324 additions and 97 deletions

View File

@@ -76,9 +76,7 @@ class Reader extends StatefulWidget {
final String name;
/// key: Chapter ID, value: Chapter Name
/// null if the comic is a gallery
final Map<String, String>? chapters;
final ComicChapters? chapters;
/// Starts from 1, invalid values equal to 1
final int? initialPage;
@@ -105,7 +103,7 @@ class _ReaderState extends State<Reader> with _ReaderLocation, _ReaderWindow {
String get cid => widget.cid;
String get eid => widget.chapters?.keys.elementAt(chapter - 1) ?? '0';
String get eid => widget.chapters?.ids.elementAt(chapter - 1) ?? '0';
List<String>? images;