From 83a6a474e7750c754c84005461d70fe3c7c3ff7f Mon Sep 17 00:00:00 2001 From: John Gray Date: Fri, 3 Oct 2025 10:17:32 -0400 Subject: [PATCH] Removed dart:html and replaced it with package:web/web.dart to allow WebAssembly --- platform_device_id_web/lib/platform_device_id_web.dart | 6 +----- platform_device_id_web/pubspec.yaml | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/platform_device_id_web/lib/platform_device_id_web.dart b/platform_device_id_web/lib/platform_device_id_web.dart index 6c482da..daac29c 100644 --- a/platform_device_id_web/lib/platform_device_id_web.dart +++ b/platform_device_id_web/lib/platform_device_id_web.dart @@ -1,9 +1,5 @@ import 'dart:async'; -// In order to *not* need this ignore, consider extracting the "web" version -// of your plugin as a separate package, instead of inlining it in the same -// package as the core of your plugin. -// ignore: avoid_web_libraries_in_flutter -import 'dart:html' as html show window; +import 'package:web/web.dart' as html show window; import 'package:flutter_web_plugins/flutter_web_plugins.dart'; import 'package:platform_device_id_platform_interface/platform_device_id_platform_interface.dart'; diff --git a/platform_device_id_web/pubspec.yaml b/platform_device_id_web/pubspec.yaml index 6aa7be0..91eb81c 100644 --- a/platform_device_id_web/pubspec.yaml +++ b/platform_device_id_web/pubspec.yaml @@ -13,6 +13,7 @@ dependencies: flutter_web_plugins: sdk: flutter platform_device_id_platform_interface: ^1.0.0 + web: ^1.1.1 dev_dependencies: flutter_test: