Open utterances-bot opened 4 years ago
写的非常不错,感谢作者!
Compiler message: ../../../work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/oktoast-2.3.1/lib/src/widget/overlay.dart:233:41: Error: The method 'findAncestorStateOfType' isn't defined for the class 'BuildContext'.
build failed.
FAILURE: Build failed with an exception.
Where: Script '/Users/work/Flutter/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 716
What went wrong: Execution failed for task ':app:compileFlutterBuildDebugArm64'.
Process 'command '/Users/work/Flutter/flutter/bin/flutter'' finished with non-zero exit value 1
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 8s Finished with error: Gradle task assembleDebug failed with exit code 1
编译报错
看仓库的issue 置顶
完美,比fluttertoast好多了。简洁实用,不失可定制性。
@xflcx1991 欢迎给你的开发朋友们安利
可以试着默认多提供集中animation效果 类似Android 原生的那种效果
@wangyujie1207 有几个默认的效果, 你也可以自己写, 另外也欢迎PR提供更好看的动画
E get first {
Iterator
出现异常。 StateError (Bad state: No element)
只要执行 showToast('xxxxxx'); 就会出异常 不知道什么原因
展示然后快速dismiss,会无法dismiss: void dismiss({bool showAnim = false}) {
///问题在这里,_mountedListener监听还没设置_isShow = true,就dismiss,执行到这里就直接return了 if (!_isShow) { _dismissed = true; return; }
_isShow = false;
_onDismiss?.call();
ToastManager().removeFuture(this);
if (showAnim) {
_containerKey.currentState?.showDismissAnim();
Future<void>.delayed(animationDuration, _removeEntry);
} else {
_removeEntry();
}
timer?.cancel();
_dismissed = true;
}
不错。支持一波,比其他toast好扩展多了!
flutter toast插件 OKToast的介绍 | caijinglong的博客
flutter toast插件 OKToast的介绍
https://www.kikt.top/posts/flutter/toast/oktoast/