From 1f40f71013e3cf8919c75eabbf049f16a3145b8e Mon Sep 17 00:00:00 2001 From: Aran Donohue Date: Mon, 16 Dec 2024 09:17:29 -0800 Subject: [PATCH] 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