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
David PHAM-VAN
2020-04-25 15:38:08 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fe5ac79485e742ba43f7aa2f5935b336bc781f55
fe5ac794
1 parent
41cd3389
Add TableRow decoration
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
pdf/CHANGELOG.md
pdf/lib/widgets/table.dart
pdf/CHANGELOG.md
View file @
fe5ac79
...
...
@@ -5,6 +5,7 @@
-
Implement Linear and Radial gradients in BoxDecoration
-
Fix PdfColors.shade()
-
Add dashed lines to Decoration Widgets
-
Add TableRow decoration
## 1.6.2
...
...
pdf/lib/widgets/table.dart
View file @
fe5ac79
...
...
@@ -25,6 +25,7 @@ class TableRow {
this
.
children
,
this
.
repeat
=
false
,
this
.
verticalAlignment
,
this
.
decoration
,
});
/// The widgets that comprise the cells in this row.
...
...
@@ -33,6 +34,8 @@ class TableRow {
/// Repeat this row on all pages
final
bool
repeat
;
final
BoxDecoration
decoration
;
final
TableCellVerticalAlignment
verticalAlignment
;
}
...
...
@@ -424,6 +427,16 @@ class Table extends Widget implements SpanningWidget {
if
(
index
++
<
_context
.
firstLine
&&
!
row
.
repeat
)
{
continue
;
}
final
Widget
child
=
row
.
children
.
first
;
if
(
child
!=
null
&&
row
.
decoration
!=
null
)
{
row
.
decoration
.
paint
(
context
,
PdfRect
(
0
,
child
.
box
.
y
,
box
.
width
,
child
.
box
.
height
),
PaintPhase
.
background
,
);
}
for
(
Widget
child
in
row
.
children
)
{
context
.
canvas
..
saveContext
()
...
...
@@ -437,6 +450,27 @@ class Table extends Widget implements SpanningWidget {
break
;
}
}
index
=
0
;
for
(
TableRow
row
in
children
)
{
if
(
index
++
<
_context
.
firstLine
&&
!
row
.
repeat
)
{
continue
;
}
final
Widget
child
=
row
.
children
.
first
;
if
(
child
!=
null
&&
row
.
decoration
!=
null
)
{
row
.
decoration
.
paint
(
context
,
PdfRect
(
0
,
child
.
box
.
y
,
box
.
width
,
child
.
box
.
height
),
PaintPhase
.
foreground
,
);
}
if
(
index
>=
_context
.
lastLine
)
{
break
;
}
}
context
.
canvas
.
restoreContext
();
if
(
border
!=
null
)
{
...
...
Please
register
or
login
to post a comment