From c88f681b473f9e1ee18e3ccd03758ed7158bd75e Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Wed, 28 Feb 2024 08:54:33 -0800 Subject: [PATCH 1/5] Add library annotations for js interop These are needed for 3.3 in order to address issue https://github.com/dart-lang/sdk/issues/54801. This commit also cleans up some unnecessary annotations. --- .../lib/src/dom_window_extension.dart | 6 ++++++ .../google_maps_flutter_web/lib/src/map_styler.dart | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/dom_window_extension.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/dom_window_extension.dart index f1b9ba34393d..9eecc8641da6 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/dom_window_extension.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/dom_window_extension.dart @@ -2,6 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// TODO(srujzs): Needed for https://github.com/dart-lang/sdk/issues/54801. Once +// we publish a version with a min SDK constraint that contains this fix, +// remove. +@JS() +library; + import 'dart:js_interop'; import 'package:web/web.dart' as web; diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/map_styler.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/map_styler.dart index e6a871599cbd..d724cdd258e5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/map_styler.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/map_styler.dart @@ -2,14 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// TODO(srujzs): Needed for https://github.com/dart-lang/sdk/issues/54801. Once +// we publish a version with a min SDK constraint that contains this fix, +// remove. +@JS() +library; + import 'dart:js_interop'; /// The interop type for a Google Maps Map Styler. /// /// See: https://developers.google.com/maps/documentation/javascript/style-reference#stylers @JS() -@staticInterop -@anonymous extension type MapStyler._(JSObject _) implements JSObject { /// Create a new [MapStyler] instance. external factory MapStyler({ From 3ae83ee197a9d24b49b02d89812684a6ea6ad68d Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Wed, 28 Feb 2024 08:57:57 -0800 Subject: [PATCH 2/5] Publish 0.5.7 --- .../google_maps_flutter/google_maps_flutter_web/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index df6988f11c6a..aea3240cb0e1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_web description: Web platform implementation of google_maps_flutter repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_web issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 0.5.6 +version: 0.5.7 environment: sdk: ^3.3.0 From 4270c434131bf3bbcec60b3602bae5e936d7d79b Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Wed, 28 Feb 2024 09:05:49 -0800 Subject: [PATCH 3/5] Add changelog entry --- .../google_maps_flutter/google_maps_flutter_web/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md index 49ed230183c5..78409b9a011f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.5.7 + +* Fixes an issue where `dart:js_interop` object literal factories did not + compile with dart2js. + ## 0.5.6 * Adds support for `MapConfiguration.style`. From da986151486ff4f0b0b8eb77ca9a8b78b9b6df96 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Wed, 28 Feb 2024 12:46:35 -0500 Subject: [PATCH 4/5] Adjust version in changelog --- .../google_maps_flutter/google_maps_flutter_web/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md index 78409b9a011f..1df35f0c3c04 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.5.7 +## 0.5.6+1 * Fixes an issue where `dart:js_interop` object literal factories did not compile with dart2js. From 67a1844c19c8a2ea18da984b2cb0c5390834c6af Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Wed, 28 Feb 2024 12:46:49 -0500 Subject: [PATCH 5/5] Adjust version --- .../google_maps_flutter/google_maps_flutter_web/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index aea3240cb0e1..6f59a0433c75 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_web description: Web platform implementation of google_maps_flutter repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_web issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 0.5.7 +version: 0.5.6+1 environment: sdk: ^3.3.0