Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
70053fff
Commit
70053fff
authored
Apr 05, 2016
by
Ian Hickson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle tables that don't have decorations.
parent
19e624cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
table.dart
packages/flutter/lib/src/rendering/table.dart
+9
-7
table.dart
packages/flutter/lib/src/widgets/table.dart
+3
-1
No files found.
packages/flutter/lib/src/rendering/table.dart
View file @
70053fff
...
...
@@ -891,13 +891,15 @@ class RenderTable extends RenderBox {
for
(
int
y
=
0
;
y
<
rows
;
y
+=
1
)
{
if
(
_rowDecorations
.
length
<=
y
)
break
;
_rowDecorationPainters
[
y
]
??=
_rowDecorations
[
y
].
createBoxPainter
();
_rowDecorationPainters
[
y
].
paint
(
canvas
,
new
Rect
.
fromLTRB
(
offset
.
dx
,
offset
.
dy
+
_rowTops
[
y
],
offset
.
dx
+
size
.
width
,
offset
.
dy
+
_rowTops
[
y
+
1
]
));
if
(
_rowDecorations
[
y
]
!=
null
)
{
_rowDecorationPainters
[
y
]
??=
_rowDecorations
[
y
].
createBoxPainter
();
_rowDecorationPainters
[
y
].
paint
(
canvas
,
new
Rect
.
fromLTRB
(
offset
.
dx
,
offset
.
dy
+
_rowTops
[
y
],
offset
.
dx
+
size
.
width
,
offset
.
dy
+
_rowTops
[
y
+
1
]
));
}
}
}
for
(
int
index
=
0
;
index
<
_children
.
length
;
index
+=
1
)
{
...
...
packages/flutter/lib/src/widgets/table.dart
View file @
70053fff
...
...
@@ -47,7 +47,9 @@ class Table extends RenderObjectWidget {
this
.
defaultVerticalAlignment
:
TableCellVerticalAlignment
.
top
,
this
.
textBaseline
})
:
children
=
children
,
_rowDecorations
=
children
.
map
/*<Decoration>*/
((
TableRow
row
)
=>
row
.
decoration
).
toList
(),
_rowDecorations
=
children
.
any
((
TableRow
row
)
=>
row
.
decoration
!=
null
)
?
children
.
map
/*<Decoration>*/
((
TableRow
row
)
=>
row
.
decoration
).
toList
()
:
null
,
super
(
key:
key
)
{
assert
(
children
!=
null
);
assert
(
defaultColumnWidth
!=
null
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment