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
473b67ef
Commit
473b67ef
authored
Feb 09, 2017
by
Ian Hickson
Committed by
GitHub
Feb 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trivial style nits (#8042)
parent
00cbdb38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
dismissable_test.dart
packages/flutter/test/widgets/dismissable_test.dart
+28
-28
No files found.
packages/flutter/test/widgets/dismissable_test.dart
View file @
473b67ef
...
...
@@ -26,34 +26,34 @@ void handleOnDismissed(DismissDirection direction, int item) {
Widget
buildTest
(
{
double
startToEndThreshold
})
{
Widget
buildDismissableItem
(
int
item
)
{
return
new
Dismissable
(
key:
new
ValueKey
<
int
>(
item
),
direction:
dismissDirection
,
onDismissed:
(
DismissDirection
direction
)
{
handleOnDismissed
(
direction
,
item
);
},
onResize:
()
{
handleOnResize
(
item
);
},
background:
background
,
dismissThresholds:
startToEndThreshold
==
null
?
<
DismissDirection
,
double
>{}
:
<
DismissDirection
,
double
>{
DismissDirection
.
startToEnd
:
startToEndThreshold
},
child:
new
Container
(
width:
itemExtent
,
height:
itemExtent
,
child:
new
Text
(
item
.
toString
())
)
key:
new
ValueKey
<
int
>(
item
),
direction:
dismissDirection
,
onDismissed:
(
DismissDirection
direction
)
{
handleOnDismissed
(
direction
,
item
);
},
onResize:
()
{
handleOnResize
(
item
);
},
background:
background
,
dismissThresholds:
startToEndThreshold
==
null
?
<
DismissDirection
,
double
>{}
:
<
DismissDirection
,
double
>{
DismissDirection
.
startToEnd
:
startToEndThreshold
},
child:
new
Container
(
width:
itemExtent
,
height:
itemExtent
,
child:
new
Text
(
item
.
toString
())
),
);
}
return
new
Container
(
padding:
const
EdgeInsets
.
all
(
10.0
),
child:
new
ScrollableList
(
scrollDirection:
scrollDirection
,
itemExtent:
itemExtent
,
children:
<
int
>[
0
,
1
,
2
,
3
,
4
]
.
where
((
int
i
)
=>
!
dismissedItems
.
contains
(
i
))
.
map
(
buildDismissableItem
)
scrollDirection:
scrollDirection
,
itemExtent:
itemExtent
,
children:
<
int
>[
0
,
1
,
2
,
3
,
4
]
.
where
((
int
i
)
=>
!
dismissedItems
.
contains
(
i
))
.
map
(
buildDismissableItem
),
)
);
}
...
...
@@ -124,8 +124,8 @@ class Test1215DismissableWidget extends StatelessWidget {
key:
new
ObjectKey
(
text
),
child:
new
AspectRatio
(
aspectRatio:
1.0
,
child:
new
Text
(
this
.
text
)
)
child:
new
Text
(
this
.
text
)
,
)
,
);
}
}
...
...
@@ -293,10 +293,10 @@ void main() {
child:
new
Column
(
children:
<
Widget
>[
new
Test1215DismissableWidget
(
'1'
),
new
Test1215DismissableWidget
(
'2'
)
]
)
)
new
Test1215DismissableWidget
(
'2'
)
,
]
,
)
,
)
,
));
expect
(
find
.
text
(
'1'
),
findsOneWidget
);
expect
(
find
.
text
(
'2'
),
findsOneWidget
);
...
...
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