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 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 26f9ab1e..aaedfdd6 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