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
f496ad05
Commit
f496ad05
authored
Nov 15, 2016
by
Hans Muller
Committed by
GitHub
Nov 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GridTileBar layout (#6844)
parent
d8e6de8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
grid_list_demo.dart
examples/flutter_gallery/lib/demo/grid_list_demo.dart
+6
-4
grid_tile_bar.dart
packages/flutter/lib/src/material/grid_tile_bar.dart
+6
-8
No files found.
examples/flutter_gallery/lib/demo/grid_list_demo.dart
View file @
f496ad05
...
...
@@ -164,10 +164,12 @@ class GridDemoPhotoItem extends StatelessWidget {
appBar:
new
AppBar
(
title:
new
Text
(
photo
.
title
)
),
body:
new
Hero
(
tag:
photo
.
tag
,
child:
new
GridPhotoViewer
(
photo:
photo
),
)
body:
new
SizedBox
.
expand
(
child:
new
Hero
(
tag:
photo
.
tag
,
child:
new
GridPhotoViewer
(
photo:
photo
),
),
),
);
}
));
...
...
packages/flutter/lib/src/material/grid_tile_bar.dart
View file @
f496ad05
...
...
@@ -64,15 +64,11 @@ class GridTileBar extends StatelessWidget {
if
(
backgroundColor
!=
null
)
decoration
=
new
BoxDecoration
(
backgroundColor:
backgroundColor
);
EdgeInsets
padding
;
if
(
leading
!=
null
&&
trailing
!=
null
)
padding
=
const
EdgeInsets
.
symmetric
(
vertical:
16.0
,
horizontal:
8.0
);
else
if
(
leading
!=
null
)
padding
=
const
EdgeInsets
.
only
(
left:
8.0
,
right:
16.0
,
top:
16.0
,
bottom:
16.0
);
else
// trailing != null || (leading == null && trailing == null)
padding
=
const
EdgeInsets
.
only
(
left:
16.0
,
right:
8.0
,
top:
16.0
,
bottom:
16.0
);
final
List
<
Widget
>
children
=
<
Widget
>[];
final
EdgeInsets
padding
=
new
EdgeInsets
.
only
(
left:
leading
!=
null
?
8.0
:
16.0
,
right:
trailing
!=
null
?
8.0
:
16.0
,
);
if
(
leading
!=
null
)
children
.
add
(
new
Padding
(
padding:
const
EdgeInsets
.
only
(
right:
8.0
),
child:
leading
));
...
...
@@ -87,6 +83,7 @@ class GridTileBar extends StatelessWidget {
children
.
add
(
new
Flexible
(
child:
new
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
new
DefaultTextStyle
(
...
...
@@ -124,6 +121,7 @@ class GridTileBar extends StatelessWidget {
return
new
Container
(
padding:
padding
,
decoration:
decoration
,
height:
(
title
!=
null
&&
subtitle
!=
null
)
?
68.0
:
48.0
,
child:
new
Theme
(
data:
darkTheme
,
child:
new
IconTheme
.
merge
(
...
...
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