【发布时间】:2014-06-14 18:21:18
【问题描述】:
我想使用 DecodeGifAnimation 解码带有the image package 的 gif,但它需要的时间太长,导致我的 web 应用程序冻结。该库似乎也没有任何异步方法。我查看了如何在 Dart 中进行异步处理,似乎我需要使用 Futures,虽然我不确定如何为我的函数创建一个。
不太清楚我在做什么
void decode(Uint8List data) {
Future anim = decodeGifAnimation(data); // but it returns Animation, not a Future!
anim.then(prepare);
}
【问题讨论】:
标签: dart dart-async