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
ff45d506
Commit
ff45d506
authored
Sep 24, 2017
by
Todd Volkert
Committed by
GitHub
Sep 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove explicit width in ListTile trailing element (#12221)
It was incorrectly added in #11858
parent
47c387b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
list_tile.dart
packages/flutter/lib/src/material/list_tile.dart
+0
-1
list_tile_test.dart
packages/flutter/test/material/list_tile_test.dart
+4
-0
No files found.
packages/flutter/lib/src/material/list_tile.dart
View file @
ff45d506
...
...
@@ -432,7 +432,6 @@ class ListTile extends StatelessWidget {
data:
iconThemeData
,
child:
new
Container
(
margin:
const
EdgeInsetsDirectional
.
only
(
start:
16.0
),
width:
40.0
,
alignment:
FractionalOffsetDirectional
.
centerEnd
,
child:
trailing
,
),
...
...
packages/flutter/test/material/list_tile_test.dart
View file @
ff45d506
...
...
@@ -77,6 +77,8 @@ void main() {
double
right
(
String
text
)
=>
tester
.
getTopRight
(
find
.
text
(
text
)).
dx
;
double
top
(
String
text
)
=>
tester
.
getTopLeft
(
find
.
text
(
text
)).
dy
;
double
bottom
(
String
text
)
=>
tester
.
getBottomLeft
(
find
.
text
(
text
)).
dy
;
double
width
(
String
text
)
=>
tester
.
getSize
(
find
.
text
(
text
)).
width
;
double
height
(
String
text
)
=>
tester
.
getSize
(
find
.
text
(
text
)).
height
;
// 16.0 padding to the left and right of the leading and trailing widgets
void
testHorizontalGeometry
()
{
...
...
@@ -86,12 +88,14 @@ void main() {
expect
(
left
(
'subtitle'
),
72.0
);
expect
(
left
(
'title'
),
right
(
'leading'
)
+
16.0
);
expect
(
right
(
'trailing'
),
800.0
-
16.0
);
expect
(
width
(
'trailing'
),
112.0
);
}
void
testVerticalGeometry
(
double
expectedHeight
)
{
expect
(
tester
.
getSize
(
find
.
byType
(
ListTile
)),
new
Size
(
800.0
,
expectedHeight
));
if
(
hasSubtitle
)
expect
(
top
(
'subtitle'
),
bottom
(
'title'
));
expect
(
height
(
'trailing'
),
14.0
);
// Fits on one line (doesn't wrap)
}
await
tester
.
pumpWidget
(
buildFrame
());
...
...
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