Pin package:web 0.4.0 (#138428)
This version is needed so that dart:js_interop can move to extension types. Also adds some code to handle some breaking changes: - Body -> Response. Body was an IDL interface mixin type we exposed in dart:html. Going forward, users should either use Request or Response. - Casts to JSAny. These are temporary until we move package:web types to extension types. Currently, package:web types can't implement JSObject as JSObject will move to be an extension type itself. Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com>
This commit is contained in:
@@ -46,7 +46,7 @@ class BenchImageDecoding extends RawRecorder {
|
||||
}
|
||||
for (final String imageUrl in _imageUrls) {
|
||||
final Future<JSAny?> fetchFuture = web.window.fetch(imageUrl.toJS).toDart;
|
||||
final web.Body image = (await fetchFuture)! as web.Body;
|
||||
final web.Response image = (await fetchFuture)! as web.Response;
|
||||
final Future<JSAny?> imageFuture = image.arrayBuffer().toDart;
|
||||
final JSArrayBuffer imageBuffer = (await imageFuture)! as JSArrayBuffer;
|
||||
_imageData.add(imageBuffer.toDart.asUint8List());
|
||||
|
||||
Reference in New Issue
Block a user