woltapp / wolt_modal_sheet

This package provides a responsive modal with multiple pages, motion animation for page transitions, and scrollable content within each page.
MIT License
473 stars 62 forks source link

WoltModalSheet does not follow finger movement smoothly when dismissing #269

Open LiangLuDev opened 2 months ago

LiangLuDev commented 2 months ago

When using WoltModalSheet.show, the modal does not follow the finger movement smoothly when attempting to close it by pulling down (similar to ModalBottomSheet). Instead, it requires significant force to pull down and close. I couldn’t find a setting to modify this behavior and am unsure if it can be adjusted.

Additionally, the distance from the top of the modal to the status bar cannot be modified. I have set the forceMaxHeight property, but it does not change the distance.

Could you please provide guidance on how to resolve these issues?

Reproduction Steps:

1.  Use WoltModalSheet.show to display a modal.
2.  Attempt to close the modal by pulling it down with a finger.
3.  Observe the resistance to movement and the inability to smoothly follow the finger.

Expected Behavior:

The modal should smoothly follow the finger movement when pulling down to close, similar to the behavior of ModalBottomSheet. Additionally, the distance from the top of the modal to the status bar should be adjustable.

Actual Behavior:

The modal requires significant force to pull down and close, and the distance to the status bar cannot be modified even when setting the forceMaxHeight property.

Environment:

•   Library version: 0.7.1
•   Platform: Mobile
•   Flutter version: 3.19

Thank you for your assistance!

ulusoyca commented 1 month ago

Hello @LiangLuDev Can you check the Custom Modal Type section in ReadMe, and create a custom modal type with a custom minFlingVelocity? https://pub.dev/packages/wolt_modal_sheet#defining-custom-modal-types

LiangLuDev commented 1 month ago

Hello @LiangLuDev Can you check the Custom Modal Type section in ReadMe, and create a custom modal type with a custom minFlingVelocity?

Yes, I found this parameter and tried to set this property. Unfortunately, it did not take effect. I also tried it in the test demo you provided, but it did not work either.

ulusoyca commented 1 month ago

Yikes! Thanks for reporting. I will take this. Maybe @durannumit can also take a look?

durannumit commented 1 month ago

Yikes! Thanks for reporting. I will take this. Maybe @durannumit can also take a look?

sure I will check according to comments