From 8c9feb5101a1c7f057deae461420d3589811ae9a Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 21 Nov 2023 14:19:12 -0800 Subject: [PATCH] [http] Fix type cast for dart2wasm (#1050) --- pkgs/http/lib/src/browser_client.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/http/lib/src/browser_client.dart b/pkgs/http/lib/src/browser_client.dart index 84f79e0538..10d8e0cdba 100644 --- a/pkgs/http/lib/src/browser_client.dart +++ b/pkgs/http/lib/src/browser_client.dart @@ -4,7 +4,6 @@ import 'dart:async'; import 'dart:js_interop'; -import 'dart:typed_data'; import 'package:web/helpers.dart'; @@ -79,7 +78,7 @@ class BrowserClient extends BaseClient { )); return; } - var body = (xhr.response as ByteBuffer).asUint8List(); + var body = (xhr.response as JSArrayBuffer).toDart.asUint8List(); completer.complete(StreamedResponse( ByteStream.fromBytes(body), xhr.status, contentLength: body.length,