-
Notifications
You must be signed in to change notification settings - Fork 138
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
连续多次打开toast后无法关闭toast #122
Comments
dependencies:
flutter_smart_dialog: ^4.9.0+4 |
@xdd666t 版本4.9.0+4 无法拉取 pub get 报错 depends on flutter_smart_dialog ^4.9.0+4 which doesn't match any versions, version solving failed. |
确认写法没有问题 ,+3的版本可以正常拉取 错误信息: |
确实是pub代理源问题 https://mirror.sjtu.edu.cn/ 可以,https://pub.flutter-io.cn不行 |
版本信息
描述bug/需求
快速的连续多次调用SmartDialog.showToast后,toast会一直显示无法关闭,当displayType为SmartToastType.onlyRefresh时稳定复现。下面是异常信息
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: 'package:flutter/src/widgets/overlay.dart': Failed assertion: line 164 pos 12: '_overlay != null': is not true.
#0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2 OverlayEntry.remove (package:flutter/src/widgets/overlay.dart:164:12)
#3 ToastTool.dismiss (package:flutter_smart_dialog/src/custom/toast/toast_tool.dart:29:38)
问题demo
SmartDialog.showToast( '这是toast信息', alignment: alignment ?? Alignment.topCenter, displayTime: const Duration(milliseconds: 1800), displayType: SmartToastType.onlyRefresh, builder: (context) { return ToastView( toastType: toastType, message: message, ); });
The text was updated successfully, but these errors were encountered: