Showing
4 changed files
with
6 additions
and
16 deletions
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | 4 | ||
5 | - Added pdfFileName prop to PdfPreview Widget [Marcos Rodriguez] | 5 | - Added pdfFileName prop to PdfPreview Widget [Marcos Rodriguez] |
6 | - Fix PdfPreview unhandled exception when popped [computib] | 6 | - Fix PdfPreview unhandled exception when popped [computib] |
7 | +- Allow to disable actions in PdfPreview [Nicolas Lopez] | ||
7 | 8 | ||
8 | ## 3.5.0 | 9 | ## 3.5.0 |
9 | 10 |
@@ -29,6 +29,7 @@ class PdfPreview extends StatefulWidget { | @@ -29,6 +29,7 @@ class PdfPreview extends StatefulWidget { | ||
29 | this.scrollViewDecoration, | 29 | this.scrollViewDecoration, |
30 | this.pdfPreviewPageDecoration, | 30 | this.pdfPreviewPageDecoration, |
31 | this.pdfFileName, | 31 | this.pdfFileName, |
32 | + this.useActions = true, | ||
32 | }) : super(key: key); | 33 | }) : super(key: key); |
33 | 34 | ||
34 | /// Called when a pdf document is needed | 35 | /// Called when a pdf document is needed |
@@ -43,6 +44,9 @@ class PdfPreview extends StatefulWidget { | @@ -43,6 +44,9 @@ class PdfPreview extends StatefulWidget { | ||
43 | /// Add a button to share the pdf document | 44 | /// Add a button to share the pdf document |
44 | final bool allowSharing; | 45 | final bool allowSharing; |
45 | 46 | ||
47 | + /// Allow disable actions | ||
48 | + final bool useActions; | ||
49 | + | ||
46 | /// Maximum width of the pdf document on screen | 50 | /// Maximum width of the pdf document on screen |
47 | final double maxPageWidth; | 51 | final double maxPageWidth; |
48 | 52 | ||
@@ -356,7 +360,7 @@ class _PdfPreviewState extends State<PdfPreview> { | @@ -356,7 +360,7 @@ class _PdfPreviewState extends State<PdfPreview> { | ||
356 | mainAxisAlignment: MainAxisAlignment.center, | 360 | mainAxisAlignment: MainAxisAlignment.center, |
357 | children: <Widget>[ | 361 | children: <Widget>[ |
358 | Expanded(child: scrollView), | 362 | Expanded(child: scrollView), |
359 | - if (actions.isNotEmpty) | 363 | + if (actions.isNotEmpty && widget.useActions) |
360 | Material( | 364 | Material( |
361 | elevation: 4, | 365 | elevation: 4, |
362 | color: theme.primaryColor, | 366 | color: theme.primaryColor, |
1 | -// This is a generated file; do not edit or check into version control. | ||
2 | -FLUTTER_ROOT=/Users/dad/Documents/Perso/flutter | ||
3 | -FLUTTER_APPLICATION_PATH=/Users/dad/Documents/Perso/dart_pdf/printing | ||
4 | -FLUTTER_BUILD_DIR=build | ||
5 | -FLUTTER_FRAMEWORK_DIR=/Users/dad/Documents/Perso/flutter/bin/cache/artifacts/engine/darwin-x64 | ||
6 | -FLUTTER_BUILD_NAME=3.4.0 | ||
7 | -FLUTTER_BUILD_NUMBER=3.4.0 |
1 | -#!/bin/sh | ||
2 | -# This is a generated file; do not edit or check into version control. | ||
3 | -export "FLUTTER_ROOT=/Users/dad/Documents/Perso/flutter" | ||
4 | -export "FLUTTER_APPLICATION_PATH=/Users/dad/Documents/Perso/dart_pdf/printing" | ||
5 | -export "FLUTTER_BUILD_DIR=build" | ||
6 | -export "FLUTTER_FRAMEWORK_DIR=/Users/dad/Documents/Perso/flutter/bin/cache/artifacts/engine/darwin-x64" | ||
7 | -export "FLUTTER_BUILD_NAME=3.4.0" | ||
8 | -export "FLUTTER_BUILD_NUMBER=3.4.0" |
-
Please register or login to post a comment