Fix saving, sharing, and collecting images when there are multiple images on the screen. Close #289

This commit is contained in:
2025-04-23 16:51:51 +08:00
parent 92d22c977c
commit ae5548918c
3 changed files with 178 additions and 108 deletions

View File

@@ -217,10 +217,16 @@ class _ReaderState extends State<Reader>
focusNode: focusNode,
autofocus: true,
onKeyEvent: onKeyEvent,
child: _ReaderScaffold(
child: _ReaderGestureDetector(
child: _ReaderImages(key: Key(chapter.toString())),
),
child: Overlay(
initialEntries: [
OverlayEntry(builder: (context) {
return _ReaderScaffold(
child: _ReaderGestureDetector(
child: _ReaderImages(key: Key(chapter.toString())),
),
);
})
],
),
);
}
@@ -604,4 +610,6 @@ abstract interface class _ImageViewController {
bool handleOnTap(Offset location);
Future<Uint8List?> getImageByOffset(Offset offset);
String? getImageKeyByOffset(Offset offset);
}