Коммит 89df4807 создал по автору Simon Binder's avatar Simon Binder
Просмотр файлов

Remove js-interop workaround

Dart 3.3 had the problem of some JS-interop methods declared to return
a `JSBoolean` actually returning a Dart `bool`, causing compilation
errors.
Now that https://github.com/dart-lang/sdk/issues/55024 has been fixed
in Dart 3.4, the workarounds introduced to fix the issue can be
reverted.
владелец 6f5aa2d8
......@@ -18,8 +18,7 @@ void main() {
Future<void> handleEvent(web.MessageEvent event) async {
final data = event.data;
// should be toDart, https://github.com/dart-lang/sdk/issues/55024
if (data.equals('start'.toJS) as bool) {
if (data.equals('start'.toJS).toDart) {
final options = WasmVfs.createOptions();
final worker = web.Worker(''); // Clone this worker
worker.postMessage(options);
......
......@@ -33,10 +33,8 @@ extension type JsBigInt(JSBigInt _jsBigInt) implements JSBigInt {
const maxSafeInteger = 9007199254740992;
const minSafeInteger = -maxSafeInteger;
// These should use toDart instead of as bool after
// https://github.com/dart-lang/sdk/issues/55024
return minSafeInteger.toJS.lessThanOrEqualTo(_jsBigInt) as bool &&
_jsBigInt.lessThanOrEqualTo(maxSafeInteger.toJS) as bool;
return minSafeInteger.toJS.lessThanOrEqualTo(_jsBigInt).toDart &&
_jsBigInt.lessThanOrEqualTo(maxSafeInteger.toJS).toDart;
}
Object toDart() {
......
......@@ -5,7 +5,7 @@ homepage: https://github.com/simolus3/sqlite3.dart/tree/main/sqlite3
issue_tracker: https://github.com/simolus3/sqlite3.dart/issues
environment:
sdk: '>=3.3.0 <4.0.0'
sdk: '>=3.4.0 <4.0.0'
# This package supports all platforms listed below.
platforms:
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать