Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/screens/reading/widgets/pdf_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ class _ReadingPdfViewState extends State<ReadingPdfView> {
duration: const Duration(milliseconds: 150),
curve: Curves.easeIn,
child: ColorFiltered(
key: ValueKey(widget.settings.theme),
// No key here: keying by theme would tear down and rebuild the
// PdfViewer subtree on every theme change, resetting scroll to the
// top. ColorFiltered updates its filter in place, so the viewer
// (and its scroll position) is preserved across theme switches.
colorFilter: colorFilter,
child: pdfViewer,
),
Expand Down