Add Wasm support (#2103)

Since dart:html is not supported when compiling to Wasm, the correct alternative now is to use dart.library.js_interop to differentiate between native and web

Source:
https://dart.dev/interop/js-interop/package-web
refactor/extensions-package-structure v10.1.10
Hamed H. 8 months ago committed by GitHub
parent ac573df0fb
commit 9c79db83c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      flutter_quill_extensions/lib/embeds/image/editor/image_web_embed.dart
  2. 3
      flutter_quill_extensions/lib/embeds/video/editor/video_web_embed.dart
  3. 2
      flutter_quill_extensions/lib/utils/dart_ui/dart_ui_real.dart

@ -5,7 +5,8 @@ import 'package:universal_html/html.dart' as html;
import '../../../models/config/image/editor/image_web_configurations.dart';
import '../../../utils/dart_ui/dart_ui_fake.dart'
if (dart.library.html) '../../../utils/dart_ui/dart_ui_real.dart' as ui;
if (dart.library.js_interop) '../../../utils/dart_ui/dart_ui_real.dart'
as ui;
import '../../../utils/element_utils/element_web_utils.dart';
import '../../../utils/utils.dart';

@ -6,7 +6,8 @@ import 'package:youtube_player_flutter/youtube_player_flutter.dart'
import '../../../models/config/video/editor/video_web_configurations.dart';
import '../../../utils/dart_ui/dart_ui_fake.dart'
if (dart.library.html) '../../../utils/dart_ui/dart_ui_real.dart' as ui;
if (dart.library.js_interop) '../../../utils/dart_ui/dart_ui_real.dart'
as ui;
import '../../../utils/element_utils/element_web_utils.dart';
import '../../../utils/utils.dart';

@ -1 +1 @@
export 'dart:ui' if (dart.library.html) 'dart:ui_web';
export 'dart:ui' if (dart.library.js_interop) 'dart:ui_web';

Loading…
Cancel
Save