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
da4fbdd4
Commit
da4fbdd4
authored
Nov 09, 2015
by
Hans Muller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated {} and fling dismiss Future value
parent
9cb8188a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
bottom_sheet.dart
packages/flutter/lib/src/material/bottom_sheet.dart
+8
-7
No files found.
packages/flutter/lib/src/material/bottom_sheet.dart
View file @
da4fbdd4
...
@@ -39,17 +39,18 @@ class _BottomSheetDragController extends StatelessComponent {
...
@@ -39,17 +39,18 @@ class _BottomSheetDragController extends StatelessComponent {
void
_handleDragEnd
(
Offset
velocity
,
BuildContext
context
)
{
void
_handleDragEnd
(
Offset
velocity
,
BuildContext
context
)
{
if
(
_dismissUnderway
)
if
(
_dismissUnderway
)
return
;
return
;
if
(
velocity
.
dy
>
_kMinFlingVelocity
)
if
(
velocity
.
dy
>
_kMinFlingVelocity
)
{
performance
.
fling
(
velocity:
-
velocity
.
dy
/
childHeight
).
then
((
dynamic
value
)
{
performance
.
fling
(
velocity:
-
velocity
.
dy
/
childHeight
).
then
((
_
)
{
Navigator
.
of
(
context
).
pop
(
value
);
Navigator
.
of
(
context
).
pop
();
});
});
else
if
(
performance
.
progress
<
_kCloseProgressThreshold
)
}
else
if
(
performance
.
progress
<
_kCloseProgressThreshold
)
{
performance
.
fling
(
velocity:
-
1.0
).
then
((
dynamic
value
)
{
performance
.
fling
(
velocity:
-
1.0
).
then
((
_
)
{
Navigator
.
of
(
context
).
pop
(
value
);
Navigator
.
of
(
context
).
pop
();
});
});
else
}
else
{
performance
.
forward
();
performance
.
forward
();
}
}
}
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
new
GestureDetector
(
return
new
GestureDetector
(
...
...
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