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
Aleksei
2023-12-22 12:03:16 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
David PHAM-VAN
2024-01-27 12:11:28 -0400
Commit
60342b500191d4ea4b49fbb4d1e270717bd8f4ba
60342b50
1 parent
692e61db
Apply additional `Wrap` properties
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
printing/lib/src/preview/action_bar_theme.dart
printing/lib/src/preview/pdf_preview.dart
printing/lib/src/preview/action_bar_theme.dart
View file @
60342b5
...
...
@@ -8,8 +8,10 @@ class PdfActionBarTheme with Diagnosticable {
this
.
iconColor
,
this
.
height
,
this
.
textStyle
,
this
.
elevation
=
4
,
this
.
elevation
=
4.0
,
this
.
actionSpacing
=
0.0
,
this
.
alignment
=
WrapAlignment
.
spaceAround
,
this
.
runAlignment
=
WrapAlignment
.
center
,
this
.
crossAxisAlignment
=
WrapCrossAlignment
.
center
,
});
...
...
@@ -18,7 +20,9 @@ class PdfActionBarTheme with Diagnosticable {
final
double
?
height
;
final
TextStyle
?
textStyle
;
final
double
elevation
;
final
double
actionSpacing
;
final
WrapAlignment
alignment
;
final
WrapAlignment
runAlignment
;
final
WrapCrossAlignment
crossAxisAlignment
;
/// Creates a copy of this object but with the given fields replaced with the
...
...
@@ -29,7 +33,9 @@ class PdfActionBarTheme with Diagnosticable {
double
?
height
,
TextStyle
?
textStyle
,
double
?
elevation
,
double
?
actionSpacing
,
WrapAlignment
?
alignment
,
WrapAlignment
?
runAlignment
,
WrapCrossAlignment
?
crossAxisAlignment
,
})
{
return
PdfActionBarTheme
(
...
...
@@ -38,7 +44,9 @@ class PdfActionBarTheme with Diagnosticable {
height:
height
??
this
.
height
,
textStyle:
textStyle
??
this
.
textStyle
,
elevation:
elevation
??
this
.
elevation
,
actionSpacing:
actionSpacing
??
this
.
actionSpacing
,
alignment:
alignment
??
this
.
alignment
,
runAlignment:
runAlignment
??
this
.
runAlignment
,
crossAxisAlignment:
crossAxisAlignment
??
this
.
crossAxisAlignment
,
);
}
...
...
@@ -50,8 +58,10 @@ class PdfActionBarTheme with Diagnosticable {
height
,
textStyle
,
elevation
,
actionSpacing
,
alignment
,
crossAxisAlignment
runAlignment
,
crossAxisAlignment
,
]);
@override
...
...
@@ -68,7 +78,9 @@ class PdfActionBarTheme with Diagnosticable {
other
.
height
==
height
&&
other
.
textStyle
==
textStyle
&&
other
.
elevation
==
elevation
&&
other
.
actionSpacing
==
actionSpacing
&&
other
.
alignment
==
alignment
&&
other
.
runAlignment
==
runAlignment
&&
other
.
crossAxisAlignment
==
crossAxisAlignment
;
}
...
...
@@ -80,8 +92,12 @@ class PdfActionBarTheme with Diagnosticable {
properties
.
add
(
DoubleProperty
(
'height'
,
height
));
properties
.
add
(
DiagnosticsProperty
<
TextStyle
>(
'textStyle'
,
textStyle
));
properties
.
add
(
DoubleProperty
(
'elevation'
,
elevation
));
properties
.
add
(
DoubleProperty
(
'actionSpacing'
,
actionSpacing
));
properties
.
add
(
DiagnosticsProperty
<
WrapAlignment
>(
'alignment'
,
alignment
,
defaultValue:
WrapAlignment
.
spaceAround
));
properties
.
add
(
DiagnosticsProperty
<
WrapAlignment
>(
'runAlignment'
,
runAlignment
,
defaultValue:
WrapAlignment
.
center
));
properties
.
add
(
DiagnosticsProperty
<
WrapCrossAlignment
>(
'crossAxisAlignment'
,
crossAxisAlignment
,
defaultValue:
WrapCrossAlignment
.
center
));
...
...
printing/lib/src/preview/pdf_preview.dart
View file @
60342b5
...
...
@@ -424,7 +424,9 @@ class PdfPreviewState extends State<PdfPreview> {
height:
widget
.
actionBarTheme
.
height
,
child:
SafeArea
(
child:
Wrap
(
spacing:
widget
.
actionBarTheme
.
actionSpacing
,
alignment:
widget
.
actionBarTheme
.
alignment
,
runAlignment:
widget
.
actionBarTheme
.
runAlignment
,
crossAxisAlignment:
widget
.
actionBarTheme
.
crossAxisAlignment
,
children:
actions
,
...
...
Please
register
or
login
to post a comment