From 705745f7fdaf46e8a0c73845643bf64cfb141c14 Mon Sep 17 00:00:00 2001 From: Ming Ming Date: Wed, 31 May 2023 00:48:58 +0800 Subject: [PATCH] Fix page viewer incorrectly disposed --- app/lib/widget/viewer.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/lib/widget/viewer.dart b/app/lib/widget/viewer.dart index 5e0ccbfb..c857fe5e 100644 --- a/app/lib/widget/viewer.dart +++ b/app/lib/widget/viewer.dart @@ -150,6 +150,7 @@ class _ViewerState extends State child: CircularProgressIndicator(), ), HorizontalPageViewer( + key: _pageViewerKey, pageCount: _streamFilesView.length, pageBuilder: (context, i) => _buildPage(context, i, originalBrightness), @@ -882,6 +883,8 @@ class _ViewerState extends State late List _streamFilesView; bool _isStreamFilesCopy = false; + final _pageViewerKey = GlobalKey(); + static const _viewportFraction = 1.05; }