-
Notifications
You must be signed in to change notification settings - Fork 73
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
ExceptionBinding是如何使ViewModel对内部api进行异常捕获和监听调用的? #18
Comments
我当前的理解是notifyException()方法可以处理判断抛出何种异常,以及api请求的数据responseData,但是不知框架何处来处理这些注册监听者回调。 有看到demo中的示例,但未能理解,看到问题麻烦描述一下,谢谢了 |
目前已经补全对应功能,并且适配了flutter 2.10 , 最新版本号: 2.2.0 |
好的,谢谢大佬啦。后续我根据更新内容补全一下我的代码。 @bladeofgod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
看到这个功能的更新:ExceptionBinding,使viewModel可以对内部的所有api接口的异常捕获
目前我的view model实现了ExceptionBinding的notifyException方法以及监听者注册,但是看了框架代码之后,没发现在什么地方来调用注册的监听。麻烦能不能解释一下?谢谢了大佬!!
注:
1.只在exception_pitcher.dart中看到view model InitData()的异常状态捕获
2.未看到其他地方对非initData()的api异常监听回调使用
The text was updated successfully, but these errors were encountered: