Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
sh
2021-06-05 02:09:45 +0930
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
David PHAM-VAN
2021-06-04 14:16:33 -0300
Commit
12cdc99b4ca4f265c389e2d77b73cdbc313a94af
12cdc99b
1 parent
b4b76608
Added a boolean toggle to show/hide debug switch
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
printing/CHANGELOG.md
printing/lib/src/preview/pdf_preview.dart
printing/CHANGELOG.md
View file @
12cdc99
...
...
@@ -5,6 +5,7 @@
-
Fix raster crash on all OS.
-
Improve PdfPreview widget
-
Fix Linux build on Debian 9
-
Added a boolean toggle to show/hide debug switch
## 5.2.1
...
...
printing/lib/src/preview/pdf_preview.dart
View file @
12cdc99
...
...
@@ -40,6 +40,7 @@ class PdfPreview extends StatefulWidget {
this
.
maxPageWidth
,
this
.
canChangePageFormat
=
true
,
this
.
canChangeOrientation
=
true
,
this
.
canDebug
=
true
,
this
.
actions
,
this
.
pageFormats
=
_defaultPageFormats
,
this
.
onError
,
...
...
@@ -89,6 +90,9 @@ class PdfPreview extends StatefulWidget {
/// Add a switch to change the page orientation
final
bool
canChangeOrientation
;
/// Add a switch to show debug view
final
bool
canDebug
;
/// Additionnal actions to add to the widget
final
List
<
PdfPreviewAction
>?
actions
;
...
...
@@ -456,7 +460,7 @@ class _PdfPreviewState extends State<PdfPreview> with PdfPreviewRaster {
}
assert
(()
{
if
(
actions
.
isNotEmpty
)
{
if
(
actions
.
isNotEmpty
&&
widget
.
canDebug
)
{
actions
.
add
(
Switch
(
activeColor:
Colors
.
red
,
...
...
Please
register
or
login
to post a comment