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
Jan Lubeck
2021-04-14 11:29:38 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
David PHAM-VAN
2021-04-14 15:25:41 -0300
Commit
c9b239420e824ba8003a0d615d7248da109a8ad2
c9b23942
1 parent
6b0591a2
Add individual cell decoration
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
pdf/lib/src/widgets/table.dart
pdf/lib/src/widgets/table.dart
View file @
c9b2394
...
...
@@ -234,6 +234,8 @@ class FractionColumnWidth extends TableColumnWidth {
}
typedef
OnCellFormat
=
String
Function
(
int
index
,
dynamic
data
);
typedef
OnCellDecoration
=
BoxDecoration
Function
(
int
index
,
dynamic
data
,
int
rowNum
);
/// A widget that uses the table layout algorithm for its children.
class
Table
extends
Widget
implements
SpanningWidget
{
...
...
@@ -256,6 +258,7 @@ class Table extends Widget implements SpanningWidget {
TextStyle
?
cellStyle
,
TextStyle
?
oddCellStyle
,
OnCellFormat
?
cellFormat
,
OnCellDecoration
?
cellDecoration
,
int
headerCount
=
1
,
List
<
dynamic
>?
headers
,
EdgeInsets
?
headerPadding
,
...
...
@@ -356,6 +359,9 @@ class Table extends Widget implements SpanningWidget {
alignment:
align
,
padding:
cellPadding
,
constraints:
BoxConstraints
(
minHeight:
cellHeight
),
decoration:
cellDecoration
==
null
?
null
:
cellDecoration
(
tableRow
.
length
,
cell
,
rowNum
),
child:
Text
(
cellFormat
==
null
?
cell
.
toString
()
...
...
Please
register
or
login
to post a comment