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

希望能够增加内置的返回事件回调 #213

Open
ddxl123 opened this issue Sep 10, 2024 · 1 comment
Open

希望能够增加内置的返回事件回调 #213

ddxl123 opened this issue Sep 10, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ddxl123
Copy link

ddxl123 commented Sep 10, 2024

dialog
在点击mask时,可以使用onMask来监听是否点击了Mask。但是在触发返回事件时,例如BackButton物理键返回
其中物理键返回只能使用backDismiss来配置是否可以返回,
BackButton可以手动进行是否返回的逻辑处理,例如在返回时需要检测表单是否正确,如果正确可以返回如果错误则无法返回。但是如果想要BackButton物理键返回使用相同的业务逻辑,就必须手动封装一层PopScope了。
当然还有一种情况是,点击maskBackButton物理键返回都需要进行相同的返回检验,这样的话,onMaskBackButton是可以进行检验业务的,但是物理键返回却要手动再封装一个PopScope才能进行校验业务。

希望能够内置PopScope,这样的话在处理类似的返回校验业务时,就能够更加便捷的调用相同逻辑了。

@xdd666t xdd666t self-assigned this Sep 10, 2024
@xdd666t xdd666t added the enhancement New feature or request label Sep 10, 2024
@xdd666t
Copy link
Member

xdd666t commented Sep 16, 2024

  • 试下新版本, 返回回调监听: onBack,有问题及时和我说下,这个版本改动量较大
dependencies:
  flutter_smart_dialog: ^4.9.8+2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants