Skip to content

Commit ccec918

Browse files
authored
Add library annotations for js interop (#6216)
These are needed for 3.3 in order to address issue dart-lang/sdk#54801. This commit also cleans up some unnecessary annotations. Also publishes 0.5.7. dart-lang/sdk#55039
1 parent 3214a67 commit ccec918

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.5.6+1
2+
3+
* Fixes an issue where `dart:js_interop` object literal factories did not
4+
compile with dart2js.
5+
16
## 0.5.6
27

38
* Adds support for `MapConfiguration.style`.

packages/google_maps_flutter/google_maps_flutter_web/lib/src/dom_window_extension.dart

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
// TODO(srujzs): Needed for https://github.com/dart-lang/sdk/issues/54801. Once
6+
// we publish a version with a min SDK constraint that contains this fix,
7+
// remove.
8+
@JS()
9+
library;
10+
511
import 'dart:js_interop';
612

713
import 'package:web/web.dart' as web;

packages/google_maps_flutter/google_maps_flutter_web/lib/src/map_styler.dart

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
// TODO(srujzs): Needed for https://github.com/dart-lang/sdk/issues/54801. Once
6+
// we publish a version with a min SDK constraint that contains this fix,
7+
// remove.
8+
@JS()
9+
library;
10+
511
import 'dart:js_interop';
612

713
/// The interop type for a Google Maps Map Styler.
814
///
915
/// See: https://developers.google.com/maps/documentation/javascript/style-reference#stylers
1016
@JS()
11-
@staticInterop
12-
@anonymous
1317
extension type MapStyler._(JSObject _) implements JSObject {
1418
/// Create a new [MapStyler] instance.
1519
external factory MapStyler({

packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: google_maps_flutter_web
22
description: Web platform implementation of google_maps_flutter
33
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_web
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
5-
version: 0.5.6
5+
version: 0.5.6+1
66

77
environment:
88
sdk: ^3.3.0

0 commit comments

Comments
 (0)