Skip to content

Commit

Permalink
Pin package:web 0.4.0
Browse files Browse the repository at this point in the history
Now that Flutter main has moved to ^0.4.0, we can pin this
version.
  • Loading branch information
srujzs committed Nov 16, 2023
1 parent 0fb3892 commit 63186f0
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 27 deletions.
2 changes: 1 addition & 1 deletion flutter-candidate.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.17.0-9.0.pre
3.17.0-10.0.pre
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ class EmbeddedExtensionControllerImpl extends EmbeddedExtensionController
);
_initialized = true;

// TODO(kenz): replace with `createIFrameElement` when we upgrade to
// package:web ^0.3.1.
_extensionIFrame = createElementTag('iframe') as HTMLIFrameElement
_extensionIFrame = createIFrameElement()
// This url is safe because we built it ourselves and it does not include
// any user input.
// ignore: unsafe_html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@ class PerfettoControllerImpl extends PerfettoController {
);
_initialized = true;

// TODO(kenz): replace with `createIFrameElement` when we upgrade to
// package:web ^0.3.1.
_perfettoIFrame = createElementTag('iframe') as HTMLIFrameElement
_perfettoIFrame = createIFrameElement()
// This url is safe because we built it ourselves and it does not include
// any user input.
// ignore: unsafe_html
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file.

import 'dart:js_util';
import 'dart:js_interop';

import 'package:web/helpers.dart' as web_helpers;
import 'package:web/web.dart';
Expand All @@ -17,9 +17,9 @@ class Notification {

late final web_helpers.Notification _impl;

static Future<String> requestPermission() {
return promiseToFuture(web_helpers.Notification.requestPermission());
}
static Future<String> requestPermission() async =>
((await web_helpers.Notification.requestPermission().toDart) as JSString)
.toDart;

void close() {
_impl.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file.

// TODO(https://github.com/flutter/devtools/issues/6606): remove this import.
// This is the final dart:html import in DevTools. In order to remove it, we
// need to bump the `package:web` version in DevTools to > 0.3.1, but we are
// blocked on `package:web` rolling into the Flutter SDK.
import 'dart:html' as html;
import 'dart:js_interop';

import 'package:web/helpers.dart';
import 'package:web/helpers.dart' as html;

import 'post_message.dart';

Expand All @@ -23,4 +18,4 @@ Stream<PostMessageEvent> get onPostMessage {
}

void postMessage(Object? message, String targetOrigin) =>
window.parent?.postMessage(message.jsify(), targetOrigin.toJS);
html.window.parent?.postMessage(message.jsify(), targetOrigin.toJS);
2 changes: 1 addition & 1 deletion packages/devtools_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dependencies:
vm_service: ^13.0.0
# TODO https://github.com/dart-lang/sdk/issues/52853 - unpin this version
vm_snapshot_analysis: 0.7.2
web: '>=0.3.0 <0.5.0'
web: ^0.4.0
web_socket_channel: ^2.1.0
# widget_icons: ^0.0.1

Expand Down
2 changes: 1 addition & 1 deletion packages/devtools_app_shared/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
meta: ^1.9.1
pointer_interceptor: ^0.9.3+3
vm_service: ^13.0.0
web: '>=0.3.0 <0.5.0'
web: ^0.4.0

dev_dependencies:
flutter_lints: ^2.0.3
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools_extensions/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies:
path: ^1.8.0
logging: ^1.1.1
vm_service: ^13.0.0
web: '>=0.3.0 <0.5.0'
web: ^0.4.0

dev_dependencies:
flutter_driver:
Expand Down

0 comments on commit 63186f0

Please sign in to comment.