From d1287953bc5164647b7c7f2e54a8bc13b6cfaa26 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 23 Oct 2023 14:46:01 -0700 Subject: [PATCH 1/3] app_shared: migrate to pkg:web --- .../devtools_app_shared/lib/src/ui/theme/_ide_theme_web.dart | 4 +--- packages/devtools_app_shared/lib/src/utils/url/_url_web.dart | 3 +-- packages/devtools_app_shared/pubspec.yaml | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/devtools_app_shared/lib/src/ui/theme/_ide_theme_web.dart b/packages/devtools_app_shared/lib/src/ui/theme/_ide_theme_web.dart index 3e143d6e93e..48aa88a2893 100644 --- a/packages/devtools_app_shared/lib/src/ui/theme/_ide_theme_web.dart +++ b/packages/devtools_app_shared/lib/src/ui/theme/_ide_theme_web.dart @@ -2,11 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file. -// ignore: avoid_web_libraries_in_flutter, as designed -import 'dart:html'; - import 'package:flutter/widgets.dart'; import 'package:logging/logging.dart'; +import 'package:web/helpers.dart'; import '../../utils/url/url.dart'; import '../../utils/utils.dart'; diff --git a/packages/devtools_app_shared/lib/src/utils/url/_url_web.dart b/packages/devtools_app_shared/lib/src/utils/url/_url_web.dart index 2329882f28b..cc240f0f754 100644 --- a/packages/devtools_app_shared/lib/src/utils/url/_url_web.dart +++ b/packages/devtools_app_shared/lib/src/utils/url/_url_web.dart @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file. -// ignore: avoid_web_libraries_in_flutter, as designed -import 'dart:html'; +import 'package:web/helpers.dart'; Map loadQueryParams({String Function(String)? urlModifier}) { var url = getWebUrl()!; diff --git a/packages/devtools_app_shared/pubspec.yaml b/packages/devtools_app_shared/pubspec.yaml index 7da974a7ad6..9ca7d2f940d 100644 --- a/packages/devtools_app_shared/pubspec.yaml +++ b/packages/devtools_app_shared/pubspec.yaml @@ -16,6 +16,7 @@ dependencies: meta: ^1.9.1 pointer_interceptor: ^0.9.3+3 vm_service: ^12.0.0 + web: ^0.3.0 dev_dependencies: flutter_lints: ^2.0.3 From 84cb5ab4e130fae828928f37b794e39bf3cf1ff0 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 23 Oct 2023 14:54:41 -0700 Subject: [PATCH 2/3] review nit --- packages/devtools_app_shared/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/devtools_app_shared/CHANGELOG.md b/packages/devtools_app_shared/CHANGELOG.md index 305f68bcca1..0cd81ce3fa5 100644 --- a/packages/devtools_app_shared/CHANGELOG.md +++ b/packages/devtools_app_shared/CHANGELOG.md @@ -6,6 +6,7 @@ * Remove public getters `onIsolateCreated` and `onIsolateExited` from `IsolateManager`. * Remove public getter `firstFrameReceived` from `ServiceExtensionManager`. * Add `RoundedButtonGroup` common widget. +* Move from `dart:html` to `package:web`. ## 0.0.6 * Add `profilePlatformChannels` to known service extensions. From f6f865941b1c865bc6d02bf3fe730ec88c81b281 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 30 Oct 2023 12:45:17 -0700 Subject: [PATCH 3/3] revert on pkg:web change --- packages/devtools_app_shared/lib/src/utils/url/_url_web.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/devtools_app_shared/lib/src/utils/url/_url_web.dart b/packages/devtools_app_shared/lib/src/utils/url/_url_web.dart index cc240f0f754..2329882f28b 100644 --- a/packages/devtools_app_shared/lib/src/utils/url/_url_web.dart +++ b/packages/devtools_app_shared/lib/src/utils/url/_url_web.dart @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file. -import 'package:web/helpers.dart'; +// ignore: avoid_web_libraries_in_flutter, as designed +import 'dart:html'; Map loadQueryParams({String Function(String)? urlModifier}) { var url = getWebUrl()!;