exprollable_page_view icon indicating copy to clipboard operation
exprollable_page_view copied to clipboard

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

Open RoyGuanyu opened this issue 1 year ago • 1 comments

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 avatar Jan 11 '24 00:01 RoyGuanyu

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.

fujidaiti avatar Jan 11 '24 12:01 fujidaiti