Throw an exception in Image.toByteData rather than hang forever. (flutter/engine#15152)
This commit is contained in:
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user