Skip to content

Commit 36dbf55

Browse files
committed
fix(core): Use updated import condition for web environment
According to https://dart.dev/interop/js-interop/past-js-interop we should now "prefer using dart:js_interop going forwards and migrate usages of old interop libraries when possible" and this change does that in order to make the library compatible with `--wasm` builds.
1 parent ee78069 commit 36dbf55

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/stream_chat/lib/src/core/platform_detector/platform_detector.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:stream_chat/src/core/platform_detector/platform_detector_stub.dart'
2-
if (dart.library.html) 'platform_detector_web.dart'
2+
if (dart.library.js_interop) 'platform_detector_web.dart'
33
if (dart.library.io) 'platform_detector_io.dart';
44

55
/// Possible platforms
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export 'stream_attachment_handler_base.dart'
2-
if (dart.library.html) 'stream_attachment_handler_html.dart'
2+
if (dart.library.js_interop) 'stream_attachment_handler_html.dart'
33
if (dart.library.io) 'stream_attachment_handler_io.dart'
44
show StreamAttachmentHandler;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export 'unsupported_db.dart'
22
if (dart.library.io) 'native_db.dart' // implementation using dart:io
3-
if (dart.library.html) 'web_db.dart';
3+
if (dart.library.js_interop) 'web_db.dart';

0 commit comments

Comments
 (0)