From 1f40f71013e3cf8919c75eabbf049f16a3145b8e Mon Sep 17 00:00:00 2001 From: Aran Donohue Date: Mon, 16 Dec 2024 09:17:29 -0800 Subject: [PATCH 1/2] Use package:web to get HttpStatus --- lib/src/shared/io_bits/io_bits.dart | 2 +- lib/src/shared/io_bits/io_bits_web.dart | 2 +- pubspec.yaml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/src/shared/io_bits/io_bits.dart b/lib/src/shared/io_bits/io_bits.dart index c7409b5e..5f0dd1f2 100644 --- a/lib/src/shared/io_bits/io_bits.dart +++ b/lib/src/shared/io_bits/io_bits.dart @@ -13,4 +13,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -export 'io_bits_io.dart' if (dart.library.html) 'io_bits_web.dart'; +export 'io_bits_io.dart' if (dart.library.js_interop) 'io_bits_web.dart'; diff --git a/lib/src/shared/io_bits/io_bits_web.dart b/lib/src/shared/io_bits/io_bits_web.dart index e8dba5a9..7f868d24 100644 --- a/lib/src/shared/io_bits/io_bits_web.dart +++ b/lib/src/shared/io_bits/io_bits_web.dart @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -export 'dart:html' show HttpStatus; +export 'package:web/web.dart' show HttpStatus; /// Unavailable on the web class InternetAddress {} diff --git a/pubspec.yaml b/pubspec.yaml index 8c393dba..02b3047a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,6 +17,7 @@ dependencies: http2: ^2.2.0 protobuf: '>=2.0.0 <4.0.0' clock: ^1.1.1 + web: ^1.1.0 dev_dependencies: build_runner: ^2.0.0 From 4df5c4ae364fd7d4061567f9d96e53ec1cc32c8e Mon Sep 17 00:00:00 2001 From: Aran Donohue Date: Tue, 17 Dec 2024 09:07:11 -0800 Subject: [PATCH 2/2] docs: add CHANGELOG.md entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 273cc7c5..e750e403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ the connection, as defined in the gRPC spec. * Upgrade to `package:lints` version 5.0.0 and Dart SDK version 3.5.0. * Upgrade `example/grpc-web` code. +* Use `package:web` to get `HttpStatus` ## 4.0.1