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

Create a method to constrain the bottom sheet to the current scaffold #60

Open
alguintu opened this issue Jul 19, 2022 · 0 comments
Open
Labels
enhancement New feature or request new issues

Comments

@alguintu
Copy link

What is the new or updated feature that you are suggesting?

Create a method to constrain the bottom sheet to the current scaffold much like how a normal call to showBottomSheet() works.

Why should this feature be included?

Currently, the showFlexibleBottomSheet() method pushes a new activity on top on the whole navigator

return Navigator.of(context, rootNavigator: useRootNavigator).push(
    _FlexibleBottomSheetRoute<T>(
      theme: Theme.of(context),
      ...
    ),
  );

instead of the default behavior of showBottomSheet() that calls:

return Scaffold.of(context).showBottomSheet<T>(
    builder,
    ...
  );

so the resulting bottom sheet goes only on top of the scaffold where it is called.

Additional context

This use-case is important for responsive web and desktop builds where there can be more than one scaffold currently on screen, and it is required that a bottomSheet only appear above the current scaffold.

If there is a way to achieve this currently, please let me know. Much appreciated.

@alguintu alguintu added the enhancement New feature or request label Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new issues
Projects
None yet
Development

No branches or pull requests

2 participants