Skip to content
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

ImageStreamListener class undefined #2

Open
ZLF930807 opened this issue Nov 4, 2019 · 1 comment
Open

ImageStreamListener class undefined #2

ZLF930807 opened this issue Nov 4, 2019 · 1 comment

Comments

@ZLF930807
Copy link

下载压缩包后本地测试报错,跟flutter sdk版本
有关系嘛?我的flutter版本为1.2.1

@dikeboy
Copy link
Owner

dikeboy commented Nov 5, 2019

下载压缩包后本地测试报错,跟flutter sdk版本
有关系嘛?我的flutter版本为1.2.1

可能是吧 你的版本太老了,现在都1.9.1了 我的是最新的 老版本的话不能这么写好像
以前
` static Future<flutterui.Image> load(String url) async {
ui.ImageStream stream = new ui.AssetImage(url, bundle: getAssetBundle())
.resolve(ui.ImageConfiguration.empty);
Completer<flutterui.Image> completer = new Completer<flutterui.Image>();
void listener(ui.ImageInfo frame, bool synchronousCall) {
final flutterui.Image image = frame.image;
completer.complete(image);
stream.removeListener(listener);
}

stream.addListener(listener);
return completer.future;

}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants