[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support drag-to-dismiss in persistent bottom sheets #62

Merged
merged 2 commits into from
Nov 9, 2015

Conversation

HansMuller
Copy link
Contributor

Flinging a persistent bottom sheet downwards dismisses it, per the Material spec.

The showBottomSheet() function now returns a Future, like showModalBottomSheet() does, so that you can discover when it's been dismissed - with navigator.pop() - and with what value.

Factored the drag gesture handling code into _BottomSheetDragController

This CL was flutter/engine#1997

void _handleDragEnd(Offset velocity, BuildContext context) {
if (_dismissUnderway)
return;
if (velocity.dy > _kMinFlingVelocity)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing { }

@abarth
Copy link
Contributor
abarth commented Nov 9, 2015

LGTM

HansMuller pushed a commit that referenced this pull request Nov 9, 2015
Support drag-to-dismiss in persistent bottom sheets

Flinging a persistent bottom sheet downwards dismisses it, per the Material spec.

The showBottomSheet() function now returns a Future, like showModalBottomSheet() does, so that you can discover when it's been dismissed - with navigator.pop() - and with what value.

Factored the drag gesture handling code into _BottomSheetDragController

This CL was flutter/engine#1997
@HansMuller HansMuller merged commit 8a8bd01 into flutter:master Nov 9, 2015
@akashgk akashgk mentioned this pull request Jun 18, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants