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

How to tap inset to dismiss and tap region to expand? #53

Open
RoyGuanyu opened this issue Jan 11, 2024 · 1 comment
Open

How to tap inset to dismiss and tap region to expand? #53

RoyGuanyu opened this issue Jan 11, 2024 · 1 comment

Comments

@RoyGuanyu
Copy link

RoyGuanyu commented Jan 11, 2024

Is it possible to

  1. dismiss by tapping the top inset
  2. enlarge(expand) the card by tapping the card

using ModalExprollableRouteBuilder.

Navigator.of(context).push(
ModalExprollableRouteBuilder(
pageBuilder: (context, _, __) => ExprollablePageView(...),
),
);

I try to set barrierDismissible to true, but not working.
ModalExprollableRouteBuilder(
barrierDismissible: true,
pageBuilder: (context, _, __) => const CustomView(),),

Thanks.

@RoyGuanyu RoyGuanyu changed the title How to tap inset to dismiss? How to tap inset to dismiss and tap region to expand? Jan 11, 2024
@fujidaiti
Copy link
Owner

enlarge(expand) the card by tapping the card

You can use ExprollablePageController. animateViewportInsetTo to enlarge your card with animation. An example code is available here.

I try to set barrierDismissible to true, but not working.

Can you post a minimal code to reproduce your problem? Since barrierDismissible is enabled by default, the dialog should close if you touch the barrier without explicitly setting it to true.

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

No branches or pull requests

2 participants