Tkko/Flutter_dismissible_page

Support both vertical and horizontal gestures at the same time

aytunch opened this issue · 5 comments

Instagram Stories allow you to move the page along both directions. Can we have the same too? Thanks

Tkko commented

Added DismissiblePageDismissDirection.multi in version 0.7.0

Example

    return DismissiblePage(
      onDismissed: () {
        Navigator.of(context).pop();
      },
      // Note that scrollable widget inside DismissiblePage might limit the functionality
      // If scroll direction matches DismissiblePage direction
      direction: DismissiblePageDismissDirection.multi,
      isFullScreen: false,
      child: Hero(
        tag: 'Unique tag',
        child: Image.network(
          imageUrl,
          fit: BoxFit.cover,
        ),
      ),
    );

Thank you very much.

Note that scrollable widget inside DismissiblePage might limit the functionality.
If scroll direction matches DismissiblePage direction

What Instagram does is, if the scrolling widgets scroll position is not on the start position, swipe gestures keeps on scrolling the inner scroll.
If the scroll position is on start, then the page dismiss happens.
I want to try to achieve this, I know it is not the responsibility of this package but it is a common use-case.
Do you have any suggestions on how this could be done @Tkko ?
Btw I hope all you people are safe and this nonsense ends soon.

Tkko commented

Thank you very much.

Note that scrollable widget inside DismissiblePage might limit the functionality.

If scroll direction matches DismissiblePage direction

What Instagram does is, if the scrolling widgets scroll position is not on the start position, swipe gestures keeps on scrolling the inner scroll.

If the scroll position is on start, then the page dismiss happens.

I want to try to achieve this, I know it is not the responsibility of this package but it is a common use-case.

Do you have any suggestions on how this could be done @Tkko ?

Btw I hope all you people are safe and this nonsense ends soon.

I'd love to implement that functionality as well, Airbnb app does it perfectly. If you manage to replicate it please let me know.

DraggableDismissibleSheet is doing kinda similar thing for reference.

Thank you for asking, I'm safe for now, well, until Putin decides to occupy Georgia (my country) again 😡

Do you mean DraggableScrollableSheet?
I could not find any info on DraggableDismissibleSheet?

Tkko commented

Do you mean DraggableScrollableSheet?

I could not find any info on DraggableDismissibleSheet?

Ahh Yes, it's DraggableScrollableSheet.