Showing
1 changed file
with
1 additions
and
6 deletions
| @@ -110,7 +110,7 @@ class PdfPreviewCustomState extends State<PdfPreviewCustom> | @@ -110,7 +110,7 @@ class PdfPreviewCustomState extends State<PdfPreviewCustom> | ||
| 110 | with PdfPreviewRaster { | 110 | with PdfPreviewRaster { |
| 111 | final listView = GlobalKey(); | 111 | final listView = GlobalKey(); |
| 112 | 112 | ||
| 113 | - List<GlobalKey> _pageGlobalKeys = <GlobalKey>[]; | 113 | + final _pageGlobalKeys = List.generate(100, (index) => GlobalKey()); |
| 114 | 114 | ||
| 115 | bool infoLoaded = false; | 115 | bool infoLoaded = false; |
| 116 | 116 | ||
| @@ -217,11 +217,6 @@ class PdfPreviewCustomState extends State<PdfPreviewCustom> | @@ -217,11 +217,6 @@ class PdfPreviewCustomState extends State<PdfPreviewCustom> | ||
| 217 | ); | 217 | ); |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | - _pageGlobalKeys = List.generate( | ||
| 221 | - pages.length, | ||
| 222 | - (index) => GlobalKey(debugLabel: 'pdf-page-$index'), | ||
| 223 | - ); | ||
| 224 | - | ||
| 225 | if (widget.pagesBuilder != null) { | 220 | if (widget.pagesBuilder != null) { |
| 226 | return widget.pagesBuilder!(context, pages); | 221 | return widget.pagesBuilder!(context, pages); |
| 227 | } | 222 | } |
-
Please register or login to post a comment