Skip to content

Commit 03760f5

Browse files
committed
fix(llc): Fixed build in dart2wasm 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 008bece commit 03760f5

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

packages/stream_chat/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- Fixed `OwnUser` specific fields getting lost when creating a new `OwnUser` instance from
1717
an `User` instance.
1818
- Fixed `Client.currentUser` specific fields getting reset on `user.updated` events.
19+
- Fixed build in dart2wasm environment.
1920

2021
✅ Added
2122

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)