未验证 提交 dba9cce1 编写于 作者: H Harry Terkelsen 提交者: GitHub

Throw an exception in `Image.toByteData` rather than hang forever. (#15152)

上级 155ee3cb
......@@ -136,6 +136,11 @@ class HtmlImage implements ui.Image {
}
}
// TODO(het): Support this for asset images and images generated from
// `Picture`s.
/// Returns an error message on failure, null on success.
String _toByteData(int format, Callback<Uint8List> callback) => null;
String _toByteData(int format, Callback<Uint8List> callback) {
callback(null);
return 'Image.toByteData is not supported in Flutter for Web';
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册