CaiJingLong / kikt-blog-comment

0 stars 0 forks source link

posts/flutter/toast/oktoast/ #17

Open utterances-bot opened 4 years ago

utterances-bot commented 4 years ago

flutter toast插件 OKToast的介绍 | caijinglong的博客

flutter toast插件 OKToast的介绍

https://www.kikt.top/posts/flutter/toast/oktoast/

derekzhan commented 4 years ago

写的非常不错,感谢作者!

funaihui commented 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.

BUILD FAILED in 8s Finished with error: Gradle task assembleDebug failed with exit code 1

funaihui commented 4 years ago

编译报错

CaiJingLong commented 4 years ago

看仓库的issue 置顶

xflcx1991 commented 4 years ago

完美,比fluttertoast好多了。简洁实用,不失可定制性。

CaiJingLong commented 4 years ago

@xflcx1991 欢迎给你的开发朋友们安利

wangyujie1207 commented 4 years ago

可以试着默认多提供集中animation效果 类似Android 原生的那种效果

CaiJingLong commented 4 years ago

@wangyujie1207 有几个默认的效果, 你也可以自己写, 另外也欢迎PR提供更好看的动画

623034345 commented 4 years ago

E get first { Iterator it = iterator; if (!it.moveNext()) { throw IterableElementError.noElement(); } return it.current; }

出现异常。 StateError (Bad state: No element)

只要执行 showToast('xxxxxx'); 就会出异常 不知道什么原因

Rockjan commented 2 years ago

展示然后快速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;

}

shaoting0730 commented 2 years ago

不错。支持一波,比其他toast好扩展多了!