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

close and open listeners #3

Open
pishguy opened this issue Jul 29, 2019 · 5 comments
Open

close and open listeners #3

pishguy opened this issue Jul 29, 2019 · 5 comments

Comments

@pishguy
Copy link

pishguy commented Jul 29, 2019

for this library how can i detect stopper opened and closed?

@aryzhov
Copy link
Owner

aryzhov commented Jul 29, 2019

You control the open event by calling showStopper. This function returns a PersistentBottomSheetController from which you can listen to the closed Future which will complete when the stopper is closed.

@pishguy
Copy link
Author

pishguy commented Jul 30, 2019

@aryzhov could you give me by code how can i do that? thanks

@aryzhov
Copy link
Owner

aryzhov commented Jul 30, 2019

void foo(BuildContext context) async {
  final controller = showStopper(context, ...);
  print("Stopper opened!");
  await controller.closed;
  print("Stopper closed!");
}

@pishguy
Copy link
Author

pishguy commented Jul 31, 2019

+1

@pishguy pishguy closed this as completed Jul 31, 2019
@pishguy pishguy reopened this Aug 15, 2019
@pishguy
Copy link
Author

pishguy commented Aug 15, 2019

@aryzhov

how can i close sheet programically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants