Closed Tommy-Wang0602 closed 2 months ago
Hi @Tommy-Wang0602,
There are 2 options to work around this issue:
route.onPopInvokedWithResult(didPop, null);
.I'm planning to work on a solution soon...
PopScope.onPopInvoked
callback when the user swipes the sheet down to dismiss the modal.PopScope.onPopInvoked
is now deprecated.Route.onPopInvoked
is also deprecated, and it no longer calls the PopScope.onPopInvoked
callback (this is the reason why PopScope doesn't work with modals in the latest SDK).As far as I know, the only solution is to replace Route.onPopInvoked
with Route.onPopInvokedWithResult
, which was newly added in Flutter 3.24. However, this solution forces package users to use the latest Flutter version, which is, of course, not ideal.
@fujidaiti Thank you for your response. May I also ask when approximately the next version will be released? Will this bug be resolved in the upcoming version?
By this weekend, hopefully...
@Tommy-Wang0602 Please follow to this guide: https://github.com/fujidaiti/smooth_sheets?tab=readme-ov-file#for-developers-using-flutter-324
hi ~ @fujidaiti I notice tutorial imperative_modal_sheet
PopScope
can not work when I drag downModalSheetRoute
,expect will show dialog but doesn'tSDK version: Flutter 3.24.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision 80c2e84975 (4 weeks ago) • 2024-07-30 23:06:49 +0700 Engine • revision b8800d88be Tools • Dart 3.5.0 • DevTools 2.37.2
video:
https://github.com/user-attachments/assets/42b674eb-7295-4e17-aaf8-80356ae007ea