diff --git a/packages/google_maps_flutter/google_maps_flutter/example/web/index.html b/packages/google_maps_flutter/google_maps_flutter/example/web/index.html index 58522ba720c..740c29cd032 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/web/index.html +++ b/packages/google_maps_flutter/google_maps_flutter/example/web/index.html @@ -33,34 +33,13 @@ Google Maps Web Example - - - - - + diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index 3ab5430b095..9a851c1c2c7 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -32,6 +32,13 @@ dev_dependencies: plugin_platform_interface: ^2.1.7 stream_transform: ^2.0.0 +# FOR TESTING ONLY DO NOT MERGE +dependency_overrides: + google_maps: + git: + url: https://github.com/a14n/dart-google-maps + ref: 0f57b7d99ed9652a31cd60a5dd4f3c6cb6b9f31a + topics: - google-maps - google-maps-flutter 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 a519cfc7ada..58b859eac34 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,7 @@ +# 0.5.9 + +* Updates `package:google_maps` dependency to latest (`^8.0.0`). + ## 0.5.8 * Adds support for BitmapDescriptor classes `AssetMapBitmap` and `BytesMapBitmap`. diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index d7c9ae288f4..7a735062c38 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -20,12 +20,24 @@ import 'google_maps_controller_test.mocks.dart'; // LatLng values. const String _kCloudMapId = '000000000000000'; // Dummy map ID. +gmaps.Map mapShim() => throw UnimplementedError(); + @GenerateNiceMocks(>[ - MockSpec(), - MockSpec(), - MockSpec(), - MockSpec(), - MockSpec(), + MockSpec( + fallbackGenerators: {#googleMap: mapShim}, + ), + MockSpec( + fallbackGenerators: {#googleMap: mapShim}, + ), + MockSpec( + fallbackGenerators: {#googleMap: mapShim}, + ), + MockSpec( + fallbackGenerators: {#googleMap: mapShim}, + ), + MockSpec( + fallbackGenerators: {#googleMap: mapShim}, + ), ]) /// Test Google Map Controller @@ -221,7 +233,7 @@ void main() { late MockPolygonsController polygons; late MockPolylinesController polylines; late MockTileOverlaysController tileOverlays; - late gmaps.GMap map; + late gmaps.Map map; setUp(() { circles = MockCirclesController(); @@ -229,7 +241,7 @@ void main() { polygons = MockPolygonsController(); polylines = MockPolylinesController(); tileOverlays = MockTileOverlaysController(); - map = gmaps.GMap(createDivElement()); + map = gmaps.Map(createDivElement()); }); testWidgets('listens to map events', (WidgetTester tester) async { @@ -246,19 +258,19 @@ void main() { // Trigger events on the map, and verify they've been broadcast to the stream final Stream> capturedEvents = stream.stream.take(5); - gmaps.Event.trigger( + gmaps.event.trigger( map, 'click', - [gmaps.MapMouseEvent()..latLng = gmaps.LatLng(0, 0)], + gmaps.MapMouseEvent()..latLng = gmaps.LatLng(0, 0), ); - gmaps.Event.trigger( + gmaps.event.trigger( map, 'rightclick', - [gmaps.MapMouseEvent()..latLng = gmaps.LatLng(0, 0)], + gmaps.MapMouseEvent()..latLng = gmaps.LatLng(0, 0), ); // The following line causes 2 events - gmaps.Event.trigger(map, 'bounds_changed', []); - gmaps.Event.trigger(map, 'idle', []); + gmaps.event.trigger(map, 'bounds_changed'); + gmaps.event.trigger(map, 'idle'); final List> events = await capturedEvents.toList(); @@ -539,12 +551,12 @@ void main() { }); }); - // These are the methods that are delegated to the gmaps.GMap object, that we can mock... + // These are the methods that are delegated to the gmaps.Map object, that we can mock... group('Map control methods', () { - late gmaps.GMap map; + late gmaps.Map map; setUp(() { - map = gmaps.GMap( + map = gmaps.Map( createDivElement(), gmaps.MapOptions() ..zoom = 10 @@ -604,7 +616,7 @@ void main() { group('viewport getters', () { testWidgets('getVisibleRegion', (WidgetTester tester) async { - final gmaps.LatLng gmCenter = map.center!; + final gmaps.LatLng gmCenter = map.center; final LatLng center = LatLng(gmCenter.lat.toDouble(), gmCenter.lng.toDouble()); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart index aef35cc4046..832b799724e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart @@ -3,14 +3,16 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i5; +import 'dart:async' as _i6; -import 'package:google_maps/google_maps.dart' as _i2; +import 'package:google_maps/google_maps.dart' as _i4; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart' - as _i4; -import 'package:google_maps_flutter_web/google_maps_flutter_web.dart' as _i3; + as _i3; +import 'package:google_maps_flutter_web/google_maps_flutter_web.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; +import 'google_maps_controller_test.dart' as _i5; + // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters @@ -24,52 +26,40 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeGMap_0 extends _i1.SmartFake implements _i2.GMap { - _FakeGMap_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - /// A class which mocks [CirclesController]. /// /// See the documentation for Mockito's code generation for more information. -class MockCirclesController extends _i1.Mock implements _i3.CirclesController { +class MockCirclesController extends _i1.Mock implements _i2.CirclesController { @override - Map<_i4.CircleId, _i3.CircleController> get circles => (super.noSuchMethod( + Map<_i3.CircleId, _i2.CircleController> get circles => (super.noSuchMethod( Invocation.getter(#circles), - returnValue: <_i4.CircleId, _i3.CircleController>{}, - returnValueForMissingStub: <_i4.CircleId, _i3.CircleController>{}, - ) as Map<_i4.CircleId, _i3.CircleController>); + returnValue: <_i3.CircleId, _i2.CircleController>{}, + returnValueForMissingStub: <_i3.CircleId, _i2.CircleController>{}, + ) as Map<_i3.CircleId, _i2.CircleController>); + @override - _i2.GMap get googleMap => (super.noSuchMethod( + _i4.Map get googleMap => (super.noSuchMethod( Invocation.getter(#googleMap), - returnValue: _FakeGMap_0( - this, - Invocation.getter(#googleMap), - ), - returnValueForMissingStub: _FakeGMap_0( - this, - Invocation.getter(#googleMap), - ), - ) as _i2.GMap); + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); + @override - set googleMap(_i2.GMap? _googleMap) => super.noSuchMethod( + set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( Invocation.setter( #googleMap, _googleMap, ), returnValueForMissingStub: null, ); + @override int get mapId => (super.noSuchMethod( Invocation.getter(#mapId), returnValue: 0, returnValueForMissingStub: 0, ) as int); + @override set mapId(int? _mapId) => super.noSuchMethod( Invocation.setter( @@ -78,24 +68,27 @@ class MockCirclesController extends _i1.Mock implements _i3.CirclesController { ), returnValueForMissingStub: null, ); + @override - void addCircles(Set<_i4.Circle>? circlesToAdd) => super.noSuchMethod( + void addCircles(Set<_i3.Circle>? circlesToAdd) => super.noSuchMethod( Invocation.method( #addCircles, [circlesToAdd], ), returnValueForMissingStub: null, ); + @override - void changeCircles(Set<_i4.Circle>? circlesToChange) => super.noSuchMethod( + void changeCircles(Set<_i3.Circle>? circlesToChange) => super.noSuchMethod( Invocation.method( #changeCircles, [circlesToChange], ), returnValueForMissingStub: null, ); + @override - void removeCircles(Set<_i4.CircleId>? circleIdsToRemove) => + void removeCircles(Set<_i3.CircleId>? circleIdsToRemove) => super.noSuchMethod( Invocation.method( #removeCircles, @@ -103,10 +96,11 @@ class MockCirclesController extends _i1.Mock implements _i3.CirclesController { ), returnValueForMissingStub: null, ); + @override void bindToMap( int? mapId, - _i2.GMap? googleMap, + _i4.Map? googleMap, ) => super.noSuchMethod( Invocation.method( @@ -124,39 +118,37 @@ class MockCirclesController extends _i1.Mock implements _i3.CirclesController { /// /// See the documentation for Mockito's code generation for more information. class MockPolygonsController extends _i1.Mock - implements _i3.PolygonsController { + implements _i2.PolygonsController { @override - Map<_i4.PolygonId, _i3.PolygonController> get polygons => (super.noSuchMethod( + Map<_i3.PolygonId, _i2.PolygonController> get polygons => (super.noSuchMethod( Invocation.getter(#polygons), - returnValue: <_i4.PolygonId, _i3.PolygonController>{}, - returnValueForMissingStub: <_i4.PolygonId, _i3.PolygonController>{}, - ) as Map<_i4.PolygonId, _i3.PolygonController>); + returnValue: <_i3.PolygonId, _i2.PolygonController>{}, + returnValueForMissingStub: <_i3.PolygonId, _i2.PolygonController>{}, + ) as Map<_i3.PolygonId, _i2.PolygonController>); + @override - _i2.GMap get googleMap => (super.noSuchMethod( + _i4.Map get googleMap => (super.noSuchMethod( Invocation.getter(#googleMap), - returnValue: _FakeGMap_0( - this, - Invocation.getter(#googleMap), - ), - returnValueForMissingStub: _FakeGMap_0( - this, - Invocation.getter(#googleMap), - ), - ) as _i2.GMap); + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); + @override - set googleMap(_i2.GMap? _googleMap) => super.noSuchMethod( + set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( Invocation.setter( #googleMap, _googleMap, ), returnValueForMissingStub: null, ); + @override int get mapId => (super.noSuchMethod( Invocation.getter(#mapId), returnValue: 0, returnValueForMissingStub: 0, ) as int); + @override set mapId(int? _mapId) => super.noSuchMethod( Invocation.setter( @@ -165,24 +157,27 @@ class MockPolygonsController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override - void addPolygons(Set<_i4.Polygon>? polygonsToAdd) => super.noSuchMethod( + void addPolygons(Set<_i3.Polygon>? polygonsToAdd) => super.noSuchMethod( Invocation.method( #addPolygons, [polygonsToAdd], ), returnValueForMissingStub: null, ); + @override - void changePolygons(Set<_i4.Polygon>? polygonsToChange) => super.noSuchMethod( + void changePolygons(Set<_i3.Polygon>? polygonsToChange) => super.noSuchMethod( Invocation.method( #changePolygons, [polygonsToChange], ), returnValueForMissingStub: null, ); + @override - void removePolygons(Set<_i4.PolygonId>? polygonIdsToRemove) => + void removePolygons(Set<_i3.PolygonId>? polygonIdsToRemove) => super.noSuchMethod( Invocation.method( #removePolygons, @@ -190,10 +185,11 @@ class MockPolygonsController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void bindToMap( int? mapId, - _i2.GMap? googleMap, + _i4.Map? googleMap, ) => super.noSuchMethod( Invocation.method( @@ -211,39 +207,37 @@ class MockPolygonsController extends _i1.Mock /// /// See the documentation for Mockito's code generation for more information. class MockPolylinesController extends _i1.Mock - implements _i3.PolylinesController { + implements _i2.PolylinesController { @override - Map<_i4.PolylineId, _i3.PolylineController> get lines => (super.noSuchMethod( + Map<_i3.PolylineId, _i2.PolylineController> get lines => (super.noSuchMethod( Invocation.getter(#lines), - returnValue: <_i4.PolylineId, _i3.PolylineController>{}, - returnValueForMissingStub: <_i4.PolylineId, _i3.PolylineController>{}, - ) as Map<_i4.PolylineId, _i3.PolylineController>); + returnValue: <_i3.PolylineId, _i2.PolylineController>{}, + returnValueForMissingStub: <_i3.PolylineId, _i2.PolylineController>{}, + ) as Map<_i3.PolylineId, _i2.PolylineController>); + @override - _i2.GMap get googleMap => (super.noSuchMethod( + _i4.Map get googleMap => (super.noSuchMethod( Invocation.getter(#googleMap), - returnValue: _FakeGMap_0( - this, - Invocation.getter(#googleMap), - ), - returnValueForMissingStub: _FakeGMap_0( - this, - Invocation.getter(#googleMap), - ), - ) as _i2.GMap); + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); + @override - set googleMap(_i2.GMap? _googleMap) => super.noSuchMethod( + set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( Invocation.setter( #googleMap, _googleMap, ), returnValueForMissingStub: null, ); + @override int get mapId => (super.noSuchMethod( Invocation.getter(#mapId), returnValue: 0, returnValueForMissingStub: 0, ) as int); + @override set mapId(int? _mapId) => super.noSuchMethod( Invocation.setter( @@ -252,16 +246,18 @@ class MockPolylinesController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override - void addPolylines(Set<_i4.Polyline>? polylinesToAdd) => super.noSuchMethod( + void addPolylines(Set<_i3.Polyline>? polylinesToAdd) => super.noSuchMethod( Invocation.method( #addPolylines, [polylinesToAdd], ), returnValueForMissingStub: null, ); + @override - void changePolylines(Set<_i4.Polyline>? polylinesToChange) => + void changePolylines(Set<_i3.Polyline>? polylinesToChange) => super.noSuchMethod( Invocation.method( #changePolylines, @@ -269,8 +265,9 @@ class MockPolylinesController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override - void removePolylines(Set<_i4.PolylineId>? polylineIdsToRemove) => + void removePolylines(Set<_i3.PolylineId>? polylineIdsToRemove) => super.noSuchMethod( Invocation.method( #removePolylines, @@ -278,10 +275,11 @@ class MockPolylinesController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void bindToMap( int? mapId, - _i2.GMap? googleMap, + _i4.Map? googleMap, ) => super.noSuchMethod( Invocation.method( @@ -298,39 +296,37 @@ class MockPolylinesController extends _i1.Mock /// A class which mocks [MarkersController]. /// /// See the documentation for Mockito's code generation for more information. -class MockMarkersController extends _i1.Mock implements _i3.MarkersController { +class MockMarkersController extends _i1.Mock implements _i2.MarkersController { @override - Map<_i4.MarkerId, _i3.MarkerController> get markers => (super.noSuchMethod( + Map<_i3.MarkerId, _i2.MarkerController> get markers => (super.noSuchMethod( Invocation.getter(#markers), - returnValue: <_i4.MarkerId, _i3.MarkerController>{}, - returnValueForMissingStub: <_i4.MarkerId, _i3.MarkerController>{}, - ) as Map<_i4.MarkerId, _i3.MarkerController>); + returnValue: <_i3.MarkerId, _i2.MarkerController>{}, + returnValueForMissingStub: <_i3.MarkerId, _i2.MarkerController>{}, + ) as Map<_i3.MarkerId, _i2.MarkerController>); + @override - _i2.GMap get googleMap => (super.noSuchMethod( + _i4.Map get googleMap => (super.noSuchMethod( Invocation.getter(#googleMap), - returnValue: _FakeGMap_0( - this, - Invocation.getter(#googleMap), - ), - returnValueForMissingStub: _FakeGMap_0( - this, - Invocation.getter(#googleMap), - ), - ) as _i2.GMap); + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); + @override - set googleMap(_i2.GMap? _googleMap) => super.noSuchMethod( + set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( Invocation.setter( #googleMap, _googleMap, ), returnValueForMissingStub: null, ); + @override int get mapId => (super.noSuchMethod( Invocation.getter(#mapId), returnValue: 0, returnValueForMissingStub: 0, ) as int); + @override set mapId(int? _mapId) => super.noSuchMethod( Invocation.setter( @@ -339,28 +335,31 @@ class MockMarkersController extends _i1.Mock implements _i3.MarkersController { ), returnValueForMissingStub: null, ); + @override - _i5.Future addMarkers(Set<_i4.Marker>? markersToAdd) => + _i6.Future addMarkers(Set<_i3.Marker>? markersToAdd) => (super.noSuchMethod( Invocation.method( #addMarkers, [markersToAdd], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override - _i5.Future changeMarkers(Set<_i4.Marker>? markersToChange) => + _i6.Future changeMarkers(Set<_i3.Marker>? markersToChange) => (super.noSuchMethod( Invocation.method( #changeMarkers, [markersToChange], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override - void removeMarkers(Set<_i4.MarkerId>? markerIdsToRemove) => + void removeMarkers(Set<_i3.MarkerId>? markerIdsToRemove) => super.noSuchMethod( Invocation.method( #removeMarkers, @@ -368,24 +367,27 @@ class MockMarkersController extends _i1.Mock implements _i3.MarkersController { ), returnValueForMissingStub: null, ); + @override - void showMarkerInfoWindow(_i4.MarkerId? markerId) => super.noSuchMethod( + void showMarkerInfoWindow(_i3.MarkerId? markerId) => super.noSuchMethod( Invocation.method( #showMarkerInfoWindow, [markerId], ), returnValueForMissingStub: null, ); + @override - void hideMarkerInfoWindow(_i4.MarkerId? markerId) => super.noSuchMethod( + void hideMarkerInfoWindow(_i3.MarkerId? markerId) => super.noSuchMethod( Invocation.method( #hideMarkerInfoWindow, [markerId], ), returnValueForMissingStub: null, ); + @override - bool isInfoWindowShown(_i4.MarkerId? markerId) => (super.noSuchMethod( + bool isInfoWindowShown(_i3.MarkerId? markerId) => (super.noSuchMethod( Invocation.method( #isInfoWindowShown, [markerId], @@ -393,10 +395,11 @@ class MockMarkersController extends _i1.Mock implements _i3.MarkersController { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void bindToMap( int? mapId, - _i2.GMap? googleMap, + _i4.Map? googleMap, ) => super.noSuchMethod( Invocation.method( @@ -414,33 +417,30 @@ class MockMarkersController extends _i1.Mock implements _i3.MarkersController { /// /// See the documentation for Mockito's code generation for more information. class MockTileOverlaysController extends _i1.Mock - implements _i3.TileOverlaysController { + implements _i2.TileOverlaysController { @override - _i2.GMap get googleMap => (super.noSuchMethod( + _i4.Map get googleMap => (super.noSuchMethod( Invocation.getter(#googleMap), - returnValue: _FakeGMap_0( - this, - Invocation.getter(#googleMap), - ), - returnValueForMissingStub: _FakeGMap_0( - this, - Invocation.getter(#googleMap), - ), - ) as _i2.GMap); + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); + @override - set googleMap(_i2.GMap? _googleMap) => super.noSuchMethod( + set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( Invocation.setter( #googleMap, _googleMap, ), returnValueForMissingStub: null, ); + @override int get mapId => (super.noSuchMethod( Invocation.getter(#mapId), returnValue: 0, returnValueForMissingStub: 0, ) as int); + @override set mapId(int? _mapId) => super.noSuchMethod( Invocation.setter( @@ -449,8 +449,9 @@ class MockTileOverlaysController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override - void addTileOverlays(Set<_i4.TileOverlay>? tileOverlaysToAdd) => + void addTileOverlays(Set<_i3.TileOverlay>? tileOverlaysToAdd) => super.noSuchMethod( Invocation.method( #addTileOverlays, @@ -458,8 +459,9 @@ class MockTileOverlaysController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override - void changeTileOverlays(Set<_i4.TileOverlay>? tileOverlays) => + void changeTileOverlays(Set<_i3.TileOverlay>? tileOverlays) => super.noSuchMethod( Invocation.method( #changeTileOverlays, @@ -467,8 +469,9 @@ class MockTileOverlaysController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override - void removeTileOverlays(Set<_i4.TileOverlayId>? tileOverlayIds) => + void removeTileOverlays(Set<_i3.TileOverlayId>? tileOverlayIds) => super.noSuchMethod( Invocation.method( #removeTileOverlays, @@ -476,18 +479,20 @@ class MockTileOverlaysController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override - void clearTileCache(_i4.TileOverlayId? tileOverlayId) => super.noSuchMethod( + void clearTileCache(_i3.TileOverlayId? tileOverlayId) => super.noSuchMethod( Invocation.method( #clearTileCache, [tileOverlayId], ), returnValueForMissingStub: null, ); + @override void bindToMap( int? mapId, - _i2.GMap? googleMap, + _i4.Map? googleMap, ) => super.noSuchMethod( Invocation.method( diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart index b84b267c042..fdd9e6e5ef8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart @@ -3,7 +3,7 @@ // found in the LICENSE file. import 'dart:async'; -import 'dart:js_util' show getProperty; +import 'dart:js_interop_unsafe'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -191,8 +191,8 @@ void main() { final gmaps.MapTypeStyle style = styles[0]; expect(style.featureType, 'poi.park'); expect(style.elementType, 'labels.text.fill'); - expect(style.stylers?.length, 1); - expect(getProperty(style.stylers![0]!, 'color'), '#6b9a76'); + expect(style.stylers.length, 1); + expect(style.stylers[0]['color'], '#6b9a76'); }); testWidgets('throws MapStyleException for invalid styles', diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.mocks.dart index 30d7b46859e..2da0a46f13f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.mocks.dart @@ -95,37 +95,42 @@ class MockGoogleMapController extends _i1.Mock Invocation.getter(#configuration), ), ) as _i2.MapConfiguration); + @override - _i3.StreamController<_i2.MapEvent> get stream => (super.noSuchMethod( + _i3.StreamController<_i2.MapEvent> get stream => (super.noSuchMethod( Invocation.getter(#stream), - returnValue: _FakeStreamController_1<_i2.MapEvent>( + returnValue: _FakeStreamController_1<_i2.MapEvent>( this, Invocation.getter(#stream), ), returnValueForMissingStub: - _FakeStreamController_1<_i2.MapEvent>( + _FakeStreamController_1<_i2.MapEvent>( this, Invocation.getter(#stream), ), - ) as _i3.StreamController<_i2.MapEvent>); + ) as _i3.StreamController<_i2.MapEvent>); + @override - _i3.Stream<_i2.MapEvent> get events => (super.noSuchMethod( + _i3.Stream<_i2.MapEvent> get events => (super.noSuchMethod( Invocation.getter(#events), - returnValue: _i3.Stream<_i2.MapEvent>.empty(), - returnValueForMissingStub: _i3.Stream<_i2.MapEvent>.empty(), - ) as _i3.Stream<_i2.MapEvent>); + returnValue: _i3.Stream<_i2.MapEvent>.empty(), + returnValueForMissingStub: _i3.Stream<_i2.MapEvent>.empty(), + ) as _i3.Stream<_i2.MapEvent>); + @override bool get isInitialized => (super.noSuchMethod( Invocation.getter(#isInitialized), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override List<_i5.MapTypeStyle> get styles => (super.noSuchMethod( Invocation.getter(#styles), returnValue: <_i5.MapTypeStyle>[], returnValueForMissingStub: <_i5.MapTypeStyle>[], ) as List<_i5.MapTypeStyle>); + @override void debugSetOverrides({ _i4.DebugCreateMapFunction? createMap, @@ -154,6 +159,7 @@ class MockGoogleMapController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void init() => super.noSuchMethod( Invocation.method( @@ -162,6 +168,7 @@ class MockGoogleMapController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void updateMapConfiguration(_i2.MapConfiguration? update) => super.noSuchMethod( @@ -171,6 +178,7 @@ class MockGoogleMapController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void updateStyles(List<_i5.MapTypeStyle>? styles) => super.noSuchMethod( Invocation.method( @@ -179,6 +187,7 @@ class MockGoogleMapController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i3.Future<_i2.LatLngBounds> getVisibleRegion() => (super.noSuchMethod( Invocation.method( @@ -201,6 +210,7 @@ class MockGoogleMapController extends _i1.Mock ), )), ) as _i3.Future<_i2.LatLngBounds>); + @override _i3.Future<_i2.ScreenCoordinate> getScreenCoordinate(_i2.LatLng? latLng) => (super.noSuchMethod( @@ -225,6 +235,7 @@ class MockGoogleMapController extends _i1.Mock ), )), ) as _i3.Future<_i2.ScreenCoordinate>); + @override _i3.Future<_i2.LatLng> getLatLng(_i2.ScreenCoordinate? screenCoordinate) => (super.noSuchMethod( @@ -247,6 +258,7 @@ class MockGoogleMapController extends _i1.Mock ), )), ) as _i3.Future<_i2.LatLng>); + @override _i3.Future moveCamera(_i2.CameraUpdate? cameraUpdate) => (super.noSuchMethod( @@ -257,6 +269,7 @@ class MockGoogleMapController extends _i1.Mock returnValue: _i3.Future.value(), returnValueForMissingStub: _i3.Future.value(), ) as _i3.Future); + @override _i3.Future getZoomLevel() => (super.noSuchMethod( Invocation.method( @@ -266,6 +279,7 @@ class MockGoogleMapController extends _i1.Mock returnValue: _i3.Future.value(0.0), returnValueForMissingStub: _i3.Future.value(0.0), ) as _i3.Future); + @override void updateCircles(_i2.CircleUpdates? updates) => super.noSuchMethod( Invocation.method( @@ -274,6 +288,7 @@ class MockGoogleMapController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void updatePolygons(_i2.PolygonUpdates? updates) => super.noSuchMethod( Invocation.method( @@ -282,6 +297,7 @@ class MockGoogleMapController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void updatePolylines(_i2.PolylineUpdates? updates) => super.noSuchMethod( Invocation.method( @@ -290,6 +306,7 @@ class MockGoogleMapController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i3.Future updateMarkers(_i2.MarkerUpdates? updates) => (super.noSuchMethod( @@ -300,6 +317,7 @@ class MockGoogleMapController extends _i1.Mock returnValue: _i3.Future.value(), returnValueForMissingStub: _i3.Future.value(), ) as _i3.Future); + @override void updateClusterManagers(_i2.ClusterManagerUpdates? updates) => super.noSuchMethod( @@ -309,6 +327,7 @@ class MockGoogleMapController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void updateTileOverlays(Set<_i2.TileOverlay>? newOverlays) => super.noSuchMethod( @@ -318,6 +337,7 @@ class MockGoogleMapController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void clearTileCache(_i2.TileOverlayId? id) => super.noSuchMethod( Invocation.method( @@ -326,6 +346,7 @@ class MockGoogleMapController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void showInfoWindow(_i2.MarkerId? markerId) => super.noSuchMethod( Invocation.method( @@ -334,6 +355,7 @@ class MockGoogleMapController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void hideInfoWindow(_i2.MarkerId? markerId) => super.noSuchMethod( Invocation.method( @@ -342,6 +364,7 @@ class MockGoogleMapController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool isInfoWindowShown(_i2.MarkerId? markerId) => (super.noSuchMethod( Invocation.method( @@ -351,6 +374,7 @@ class MockGoogleMapController extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void dispose() => super.noSuchMethod( Invocation.method( diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_test.dart index 0b284cac766..39809e5528d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_test.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. import 'dart:async'; +import 'dart:js_interop'; import 'package:flutter_test/flutter_test.dart'; import 'package:google_maps/google_maps.dart' as gmaps; @@ -56,7 +57,11 @@ void main() { MarkerController(marker: marker, onTap: onTap); // Trigger a click event... - gmaps.Event.trigger(marker, 'click', [gmaps.MapMouseEvent()]); + gmaps.event.trigger( + marker, + 'click', + [gmaps.MapMouseEvent()].toJS, + ); // The event handling is now truly async. Wait for it... expect(await methodCalled, isTrue); @@ -66,8 +71,13 @@ void main() { MarkerController(marker: marker, onDragStart: onDragStart); // Trigger a drag end event... - gmaps.Event.trigger(marker, 'dragstart', - [gmaps.MapMouseEvent()..latLng = gmaps.LatLng(0, 0)]); + gmaps.event.trigger( + marker, + 'dragstart', + [ + gmaps.MapMouseEvent()..latLng = gmaps.LatLng(0, 0), + ].toJS, + ); expect(await methodCalled, isTrue); }); @@ -76,10 +86,12 @@ void main() { MarkerController(marker: marker, onDrag: onDrag); // Trigger a drag end event... - gmaps.Event.trigger( + gmaps.event.trigger( marker, 'drag', - [gmaps.MapMouseEvent()..latLng = gmaps.LatLng(0, 0)], + [ + gmaps.MapMouseEvent()..latLng = gmaps.LatLng(0, 0), + ].toJS, ); expect(await methodCalled, isTrue); @@ -89,10 +101,12 @@ void main() { MarkerController(marker: marker, onDragEnd: onDragEnd); // Trigger a drag end event... - gmaps.Event.trigger( + gmaps.event.trigger( marker, 'dragend', - [gmaps.MapMouseEvent()..latLng = gmaps.LatLng(0, 0)], + [ + gmaps.MapMouseEvent()..latLng = gmaps.LatLng(0, 0), + ].toJS, ); expect(await methodCalled, isTrue); @@ -104,7 +118,7 @@ void main() { ..draggable = true ..position = gmaps.LatLng(42, 54); - expect(marker.draggable, isNull); + expect(marker.isDraggableDefined(), isFalse); controller.update(options); @@ -124,7 +138,7 @@ void main() { testWidgets('showInfoWindow', (WidgetTester tester) async { final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); - final gmaps.GMap map = gmaps.GMap(createDivElement()); + final gmaps.Map map = gmaps.Map(createDivElement()); marker.set('map', map); final MarkerController controller = MarkerController( marker: marker, @@ -139,7 +153,7 @@ void main() { testWidgets('hideInfoWindow', (WidgetTester tester) async { final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); - final gmaps.GMap map = gmaps.GMap(createDivElement()); + final gmaps.Map map = gmaps.Map(createDivElement()); marker.set('map', map); final MarkerController controller = MarkerController( marker: marker, @@ -157,7 +171,7 @@ void main() { setUp(() { final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); - final gmaps.GMap map = gmaps.GMap(createDivElement()); + final gmaps.Map map = gmaps.Map(createDivElement()); marker.set('map', map); controller = MarkerController(marker: marker, infoWindow: infoWindow); }); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/markers_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/markers_test.dart index f068ec8db30..8de4a504149 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/markers_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/markers_test.dart @@ -26,7 +26,7 @@ void main() { late StreamController> events; late MarkersController controller; late ClusterManagersController clusterManagersController; - late gmaps.GMap map; + late gmaps.Map map; setUp(() { events = StreamController>(); @@ -34,7 +34,7 @@ void main() { clusterManagersController = ClusterManagersController(stream: events); controller = MarkersController( stream: events, clusterManagersController: clusterManagersController); - map = gmaps.GMap(createDivElement()); + map = gmaps.Map(createDivElement()); clusterManagersController.bindToMap(123, map); controller.bindToMap(123, map); }); @@ -230,7 +230,7 @@ void main() { controller.markers[const MarkerId('1')]?.marker?.icon as gmaps.Icon?; expect(icon, isNotNull); - final String assetUrl = icon!.url!; + final String assetUrl = icon!.url; expect(assetUrl, startsWith('assets')); final gmaps.Size size = icon.size!; @@ -262,7 +262,7 @@ void main() { controller.markers[const MarkerId('1')]?.marker?.icon as gmaps.Icon?; expect(icon, isNotNull); - final String assetUrl = icon!.url!; + final String assetUrl = icon!.url; expect(assetUrl, startsWith('assets')); final gmaps.Size size = icon.size!; @@ -297,7 +297,7 @@ void main() { controller.markers[const MarkerId('1')]?.marker?.icon as gmaps.Icon?; expect(icon, isNotNull); - final String assetUrl = icon!.url!; + final String assetUrl = icon!.url; expect(assetUrl, startsWith('assets')); final gmaps.Size size = icon.size!; @@ -330,7 +330,7 @@ void main() { controller.markers[const MarkerId('1')]?.marker?.icon as gmaps.Icon?; expect(icon, isNotNull); - final String assetUrl = icon!.url!; + final String assetUrl = icon!.url; expect(assetUrl, startsWith('assets')); // For invalid assets, the size and scaledSize should be null. @@ -360,7 +360,7 @@ void main() { controller.markers[const MarkerId('1')]?.marker?.icon as gmaps.Icon?; expect(icon, isNotNull); - final String blobUrl = icon!.url!; + final String blobUrl = icon!.url; expect(blobUrl, startsWith('blob:')); final http.Response response = await http.get(Uri.parse(blobUrl)); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlay_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlay_test.dart index 0724da21127..26ba81bcd17 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlay_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlay_test.dart @@ -41,11 +41,11 @@ void main() { tileOverlay: const TileOverlay(tileOverlayId: id), ); - final gmaps.Size size = controller.gmMapType.tileSize!; + final gmaps.Size size = controller.gmMapType.tileSize; expect(size.width, TileOverlayController.logicalTileSize); expect(size.height, TileOverlayController.logicalTileSize); expect( - controller.gmMapType.getTile!(gmaps.Point(0, 0), 0, document), + controller.gmMapType.getTile(gmaps.Point(0, 0), 0, document), null, ); }); @@ -58,9 +58,8 @@ void main() { ), ); - final HTMLImageElement img = - controller.gmMapType.getTile!(gmaps.Point(0, 0), 0, document)! - as HTMLImageElement; + final HTMLImageElement img = controller.gmMapType + .getTile(gmaps.Point(0, 0), 0, document)! as HTMLImageElement; expect(img.naturalWidth, 0); expect(img.naturalHeight, 0); expect(img.hidden, true); @@ -82,9 +81,8 @@ void main() { ), ); { - final HTMLImageElement img = - controller.gmMapType.getTile!(gmaps.Point(0, 0), 0, document)! - as HTMLImageElement; + final HTMLImageElement img = controller.gmMapType + .getTile(gmaps.Point(0, 0), 0, document)! as HTMLImageElement; await null; // let `getTile` `then` complete expect( img.src, @@ -98,9 +96,8 @@ void main() { tileProvider: TestTileProvider(), )); { - final HTMLImageElement img = - controller.gmMapType.getTile!(gmaps.Point(0, 0), 0, document)! - as HTMLImageElement; + final HTMLImageElement img = controller.gmMapType + .getTile(gmaps.Point(0, 0), 0, document)! as HTMLImageElement; await img.onLoad.first; @@ -114,7 +111,7 @@ void main() { controller.update(const TileOverlay(tileOverlayId: id)); { expect( - controller.gmMapType.getTile!(gmaps.Point(0, 0), 0, document), + controller.gmMapType.getTile(gmaps.Point(0, 0), 0, document), null, reason: 'Setting a null tileProvider should work.', ); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.dart index c680c97a993..1b5b8af5f02 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. import 'dart:async'; +import 'dart:js_interop'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -32,21 +33,21 @@ void main() { group('TileOverlaysController', () { late TileOverlaysController controller; - late gmaps.GMap map; + late gmaps.Map map; late List tileProviders; late List tileOverlays; /// Queries the current overlay map types for tiles at x = 0, y = 0, zoom = /// 0. void probeTiles() { - for (final gmaps.MapType? mapType in map.overlayMapTypes!.array!) { - mapType?.getTile!(gmaps.Point(0, 0), 0, document); + for (final gmaps.MapType? mapType in map.overlayMapTypes.array.toDart) { + mapType?.getTile(gmaps.Point(0, 0), 0, document); } } setUp(() { controller = TileOverlaysController(); - map = gmaps.GMap(createDivElement()); + map = gmaps.Map(createDivElement()); controller.googleMap = map; tileProviders = [ diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/shape_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/shape_test.dart index 11af181cffc..3c4d9f4c9a7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/shape_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/shape_test.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. import 'dart:async'; +import 'dart:js_interop'; import 'package:flutter_test/flutter_test.dart'; import 'package:google_maps/google_maps.dart' as gmaps; @@ -35,14 +36,18 @@ void main() { late gmaps.Circle circle; setUp(() { - circle = gmaps.Circle(); + circle = gmaps.Circle(gmaps.CircleOptions()); }); testWidgets('onTap gets called', (WidgetTester tester) async { CircleController(circle: circle, consumeTapEvents: true, onTap: onTap); // Trigger a click event... - gmaps.Event.trigger(circle, 'click', [gmaps.MapMouseEvent()]); + gmaps.event.trigger( + circle, + 'click', + [gmaps.MapMouseEvent()].toJS, + ); // The event handling is now truly async. Wait for it... expect(await methodCalled, isTrue); @@ -53,7 +58,7 @@ void main() { final gmaps.CircleOptions options = gmaps.CircleOptions() ..draggable = true; - expect(circle.draggable, isNull); + expect(circle.isDraggableDefined(), isFalse); controller.update(options); @@ -98,7 +103,11 @@ void main() { PolygonController(polygon: polygon, consumeTapEvents: true, onTap: onTap); // Trigger a click event... - gmaps.Event.trigger(polygon, 'click', [gmaps.MapMouseEvent()]); + gmaps.event.trigger( + polygon, + 'click', + [gmaps.MapMouseEvent()].toJS, + ); // The event handling is now truly async. Wait for it... expect(await methodCalled, isTrue); @@ -109,7 +118,7 @@ void main() { final gmaps.PolygonOptions options = gmaps.PolygonOptions() ..draggable = true; - expect(polygon.draggable, isNull); + expect(polygon.isDraggableDefined(), isFalse); controller.update(options); @@ -158,7 +167,11 @@ void main() { ); // Trigger a click event... - gmaps.Event.trigger(polyline, 'click', [gmaps.MapMouseEvent()]); + gmaps.event.trigger( + polyline, + 'click', + [gmaps.MapMouseEvent()].toJS, + ); // The event handling is now truly async. Wait for it... expect(await methodCalled, isTrue); @@ -171,7 +184,7 @@ void main() { final gmaps.PolylineOptions options = gmaps.PolylineOptions() ..draggable = true; - expect(polyline.draggable, isNull); + expect(polyline.isDraggableDefined(), isFalse); controller.update(options); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/shapes_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/shapes_test.dart index ad3d3d4a8a4..42b0e5b0fef 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/shapes_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/shapes_test.dart @@ -23,10 +23,10 @@ const double _acceptableDelta = 0.01; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - late gmaps.GMap map; + late gmaps.Map map; setUp(() { - map = gmaps.GMap(createDivElement()); + map = gmaps.Map(createDivElement()); }); group('CirclesController', () { @@ -253,7 +253,7 @@ void main() { final gmaps.Polygon? polygon = controller.polygons.values.first.polygon; final gmaps.LatLng pointInHole = gmaps.LatLng(28.632, -68.401); - expect(geometry.Poly.containsLocation(pointInHole, polygon), false); + expect(geometry.poly.containsLocation(pointInHole, polygon!), false); }); testWidgets('Hole Path gets reversed to display correctly', @@ -279,7 +279,7 @@ void main() { controller.addPolygons(polygons); final gmaps.MVCArray?> paths = - controller.polygons.values.first.polygon!.paths!; + controller.polygons.values.first.polygon!.paths; expect(paths.getAt(1)?.getAt(0)?.lat, 28.745); expect(paths.getAt(1)?.getAt(1)?.lat, 29.57); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index 85a89ed5bf9..78535333145 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -18,7 +18,7 @@ dev_dependencies: build_runner: ^2.1.1 flutter_test: sdk: flutter - google_maps: ^7.1.0 + google_maps: ^8.0.0-dev.1 google_maps_flutter: ^2.2.0 # Needed for projection_test.dart http: ">=0.13.0 <2.0.0" integration_test: @@ -30,6 +30,11 @@ flutter: - assets/ dependency_overrides: + # FOR TESTING ONLY. DO NOT MERGE. + google_maps: + git: + url: https://github.com/a14n/dart-google-maps + ref: 0f57b7d99ed9652a31cd60a5dd4f3c6cb6b9f31a # Override the google_maps_flutter dependency on google_maps_flutter_web. # TODO(ditman): Unwind the circular dependency. This will create problems # if we need to make a breaking change to google_maps_flutter_web. diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/web/index.html b/packages/google_maps_flutter/google_maps_flutter_web/example/web/index.html index 9cbd7be791d..4d058d79cc5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/web/index.html +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/web/index.html @@ -10,6 +10,6 @@ - + diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index ee9100ddff0..0032cf5a417 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -195,12 +195,13 @@ LatLngBounds gmLatLngBoundsTolatLngBounds(gmaps.LatLngBounds latLngBounds) { ); } -CameraPosition _gmViewportToCameraPosition(gmaps.GMap map) { +CameraPosition _gmViewportToCameraPosition(gmaps.Map map) { return CameraPosition( - target: gmLatLngToLatLng(map.center ?? _nullGmapsLatLng), - bearing: map.heading?.toDouble() ?? 0, - tilt: map.tilt?.toDouble() ?? 0, - zoom: map.zoom?.toDouble() ?? 0, + target: + gmLatLngToLatLng(map.isCenterDefined() ? map.center : _nullGmapsLatLng), + bearing: map.isHeadingDefined() ? map.heading.toDouble() : 0, + tilt: map.isTiltDefined() ? map.tilt.toDouble() : 0, + zoom: map.isZoomDefined() ? map.zoom.toDouble() : 0, ); } @@ -475,7 +476,7 @@ gmaps.CircleOptions _circleOptionsFromCircle(Circle circle) { } gmaps.PolygonOptions _polygonOptionsFromPolygon( - gmaps.GMap googleMap, Polygon polygon) { + gmaps.Map googleMap, Polygon polygon) { // Convert all points to GmLatLng final List path = polygon.points.map(_latLngToGmLatLng).toList(); @@ -496,7 +497,7 @@ gmaps.PolygonOptions _polygonOptionsFromPolygon( } return gmaps.PolygonOptions() - ..paths = paths + ..paths = paths.map((List e) => e.toJS).toList().toJS ..strokeColor = _getCssColor(polygon.strokeColor) ..strokeOpacity = _getCssOpacity(polygon.strokeColor) ..strokeWeight = polygon.strokeWidth @@ -550,12 +551,12 @@ bool _isPolygonClockwise(List path) { } gmaps.PolylineOptions _polylineOptionsFromPolyline( - gmaps.GMap googleMap, Polyline polyline) { + gmaps.Map googleMap, Polyline polyline) { final List paths = polyline.points.map(_latLngToGmLatLng).toList(); return gmaps.PolylineOptions() - ..path = paths + ..path = paths.toJS ..strokeWeight = polyline.width ..strokeColor = _getCssColor(polyline.color) ..strokeOpacity = _getCssOpacity(polyline.color) @@ -569,8 +570,8 @@ gmaps.PolylineOptions _polylineOptionsFromPolyline( // this.width = 10, } -// Translates a [CameraUpdate] into operations on a [gmaps.GMap]. -void _applyCameraUpdate(gmaps.GMap map, CameraUpdate update) { +// Translates a [CameraUpdate] into operations on a [gmaps.Map]. +void _applyCameraUpdate(gmaps.Map map, CameraUpdate update) { // Casts [value] to a JSON dictionary (string -> nullable object). [value] // must be a non-null JSON dictionary. Map asJsonObject(dynamic value) { @@ -587,19 +588,19 @@ void _applyCameraUpdate(gmaps.GMap map, CameraUpdate update) { case 'newCameraPosition': final Map position = asJsonObject(json[1]); final List latLng = asJsonList(position['target']); - map.heading = position['bearing'] as num?; - map.zoom = position['zoom'] as num?; + map.heading = position['bearing']! as num; + map.zoom = position['zoom']! as num; map.panTo( - gmaps.LatLng(latLng[0] as num?, latLng[1] as num?), + gmaps.LatLng(latLng[0]! as num, latLng[1]! as num), ); - map.tilt = position['tilt'] as num?; + map.tilt = position['tilt']! as num; case 'newLatLng': final List latLng = asJsonList(json[1]); - map.panTo(gmaps.LatLng(latLng[0] as num?, latLng[1] as num?)); + map.panTo(gmaps.LatLng(latLng[0]! as num, latLng[1]! as num)); case 'newLatLngZoom': final List latLng = asJsonList(json[1]); - map.zoom = json[2] as num?; - map.panTo(gmaps.LatLng(latLng[0] as num?, latLng[1] as num?)); + map.zoom = json[2]! as num; + map.panTo(gmaps.LatLng(latLng[0]! as num, latLng[1]! as num)); case 'newLatLngBounds': final List latLngPair = asJsonList(json[1]); final List latLng1 = asJsonList(latLngPair[0]); @@ -607,13 +608,13 @@ void _applyCameraUpdate(gmaps.GMap map, CameraUpdate update) { final double padding = json[2] as double; map.fitBounds( gmaps.LatLngBounds( - gmaps.LatLng(latLng1[0] as num?, latLng1[1] as num?), - gmaps.LatLng(latLng2[0] as num?, latLng2[1] as num?), + gmaps.LatLng(latLng1[0]! as num, latLng1[1]! as num), + gmaps.LatLng(latLng2[0]! as num, latLng2[1]! as num), ), - padding, + padding.toJS, ); case 'scrollBy': - map.panBy(json[1] as num?, json[2] as num?); + map.panBy(json[1]! as num, json[2]! as num); case 'zoomBy': gmaps.LatLng? focusLatLng; final double zoomDelta = json[1] as double? ?? 0; @@ -631,44 +632,45 @@ void _applyCameraUpdate(gmaps.GMap map, CameraUpdate update) { // print('Error computing new focus LatLng. JS Error: ' + e.toString()); } } - map.zoom = (map.zoom ?? 0) + newZoomDelta; + map.zoom = (map.isZoomDefined() ? map.zoom : 0) + newZoomDelta; if (focusLatLng != null) { map.panTo(focusLatLng); } case 'zoomIn': - map.zoom = (map.zoom ?? 0) + 1; + map.zoom = (map.isZoomDefined() ? map.zoom : 0) + 1; case 'zoomOut': - map.zoom = (map.zoom ?? 0) - 1; + map.zoom = (map.isZoomDefined() ? map.zoom : 0) - 1; case 'zoomTo': - map.zoom = json[1] as num?; + map.zoom = json[1]! as num; default: throw UnimplementedError('Unimplemented CameraMove: ${json[0]}.'); } } // original JS by: Byron Singh (https://stackoverflow.com/a/30541162) -gmaps.LatLng _pixelToLatLng(gmaps.GMap map, int x, int y) { +gmaps.LatLng _pixelToLatLng(gmaps.Map map, int x, int y) { final gmaps.LatLngBounds? bounds = map.bounds; final gmaps.Projection? projection = map.projection; - final num? zoom = map.zoom; assert( bounds != null, 'Map Bounds required to compute LatLng of screen x/y.'); assert(projection != null, 'Map Projection required to compute LatLng of screen x/y'); - assert(zoom != null, + assert(map.isZoomDefined(), 'Current map zoom level required to compute LatLng of screen x/y'); + final num zoom = map.zoom; + final gmaps.LatLng ne = bounds!.northEast; final gmaps.LatLng sw = bounds.southWest; - final gmaps.Point topRight = projection!.fromLatLngToPoint!(ne)!; - final gmaps.Point bottomLeft = projection.fromLatLngToPoint!(sw)!; + final gmaps.Point topRight = projection!.fromLatLngToPoint(ne)!; + final gmaps.Point bottomLeft = projection.fromLatLngToPoint(sw)!; - final int scale = 1 << (zoom!.toInt()); // 2 ^ zoom + final int scale = 1 << (zoom.toInt()); // 2 ^ zoom final gmaps.Point point = - gmaps.Point((x / scale) + bottomLeft.x!, (y / scale) + topRight.y!); + gmaps.Point((x / scale) + bottomLeft.x, (y / scale) + topRight.y); - return projection.fromPointToLatLng!(point)!; + return projection.fromPointToLatLng(point)!; } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 37c1e8a2fff..3baeef8851a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -6,14 +6,14 @@ part of '../google_maps_flutter_web.dart'; /// Type used when passing an override to the _createMap function. @visibleForTesting -typedef DebugCreateMapFunction = gmaps.GMap Function( +typedef DebugCreateMapFunction = gmaps.Map Function( HTMLElement div, gmaps.MapOptions options); /// Type used when passing an override to the _setOptions function. @visibleForTesting typedef DebugSetOptionsFunction = void Function(gmaps.MapOptions options); -/// Encapsulates a [gmaps.GMap], its events, and where in the DOM it's rendered. +/// Encapsulates a [gmaps.Map], its events, and where in the DOM it's rendered. class GoogleMapController { /// Initializes the GMap, and the sub-controllers related to it. Wires events. GoogleMapController({ @@ -45,7 +45,7 @@ class GoogleMapController { // Register the view factory that will hold the `_div` that holds the map in the DOM. // The `_div` needs to be created outside of the ViewFactory (and cached!) so we can - // use it to create the [gmaps.GMap] in the `init()` method of this class. + // use it to create the [gmaps.Map] in the `init()` method of this class. _div = createDivElement() ..id = _getViewType(mapId) ..style.width = '100%' @@ -108,7 +108,7 @@ class GoogleMapController { gmaps.TrafficLayer? get trafficLayer => _trafficLayer; // The underlying GMap instance. This is the interface with the JS SDK. - gmaps.GMap? _googleMap; + gmaps.Map? _googleMap; // The StreamController used by this controller and the geometry ones. final StreamController> _streamController; @@ -164,11 +164,11 @@ class GoogleMapController { DebugCreateMapFunction? _overrideCreateMap; DebugSetOptionsFunction? _overrideSetOptions; - gmaps.GMap _createMap(HTMLElement div, gmaps.MapOptions options) { + gmaps.Map _createMap(HTMLElement div, gmaps.MapOptions options) { if (_overrideCreateMap != null) { return _overrideCreateMap!(div, options); } - return gmaps.GMap(div, options); + return gmaps.Map(div, options); } /// A flag that returns true if the controller has been initialized or not. @@ -179,7 +179,7 @@ class GoogleMapController { /// /// (Also initializes the geometry/traffic layers.) /// - /// The first part of this method starts the rendering of a [gmaps.GMap] inside + /// The first part of this method starts the rendering of a [gmaps.Map] inside /// of the target [_div], with configuration from `rawOptions`. It then stores /// the created GMap in the [_googleMap] attribute. /// @@ -207,7 +207,7 @@ class GoogleMapController { } // Create the map... - final gmaps.GMap map = _createMap(_div, options); + final gmaps.Map map = _createMap(_div, options); _googleMap = map; _attachMapEvents(map); @@ -221,12 +221,12 @@ class GoogleMapController { } // Funnels map gmap events into the plugin's stream controller. - void _attachMapEvents(gmaps.GMap map) { + void _attachMapEvents(gmaps.Map map) { map.onTilesloaded.first.then((void _) { // Report the map as ready to go the first time the tiles load _streamController.add(WebMapReadyEvent(_mapId)); }); - map.onClick.listen((gmaps.IconMouseEvent event) { + map.onClick.listen((gmaps.MapMouseEventOrIconMouseEvent event) { assert(event.latLng != null); _streamController.add( MapTapEvent(_mapId, gmLatLngToLatLng(event.latLng!)), @@ -254,7 +254,7 @@ class GoogleMapController { } // Binds the Geometry controllers to a map instance - void _attachGeometryControllers(gmaps.GMap map) { + void _attachGeometryControllers(gmaps.Map map) { // Now we can add the initial geometry. // And bind the (ready) map instance to the other geometry controllers. // @@ -373,7 +373,7 @@ class GoogleMapController { } // Attaches/detaches a Traffic Layer on the passed `map` if `attach` is true/false. - void _setTrafficLayer(gmaps.GMap map, bool attach) { + void _setTrafficLayer(gmaps.Map map, bool attach) { if (attach && _trafficLayer == null) { _trafficLayer = gmaps.TrafficLayer()..set('map', map); } @@ -405,7 +405,7 @@ class GoogleMapController { final gmaps.Point point = toScreenLocation(_googleMap!, _latLngToGmLatLng(latLng)); - return ScreenCoordinate(x: point.x!.toInt(), y: point.y!.toInt()); + return ScreenCoordinate(x: point.x.toInt(), y: point.y.toInt()); } /// Returns the [LatLng] for a `screenCoordinate` (in pixels) of the viewport. @@ -428,10 +428,10 @@ class GoogleMapController { /// Returns the zoom level of the current viewport. Future getZoomLevel() async { assert(_googleMap != null, 'Cannot get zoom level of a null map.'); - assert(_googleMap!.zoom != null, + assert(_googleMap!.isZoomDefined(), 'Zoom level should not be null. Is the map correctly initialized?'); - return _googleMap!.zoom!.toDouble(); + return _googleMap!.zoom.toDouble(); } // Geometry manipulation diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart index d4b5ed3bd70..89ad41bd481 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart @@ -43,7 +43,7 @@ class ClusterManagersController extends GeometryController { final MarkerClusterer markerClusterer = createMarkerClusterer( googleMap, (gmaps.MapMouseEvent event, MarkerClustererCluster cluster, - gmaps.GMap map) => + gmaps.Map map) => _clusterClicked( clusterManager.clusterManagerId, event, cluster, map)); @@ -109,7 +109,7 @@ class ClusterManagersController extends GeometryController { ClusterManagerId clusterManagerId, gmaps.MapMouseEvent event, MarkerClustererCluster markerClustererCluster, - gmaps.GMap map) { + gmaps.Map map) { if (markerClustererCluster.count > 0 && markerClustererCluster.bounds != null) { final Cluster cluster = diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart index e3bf42b4e71..80e7e5fc1c1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart @@ -16,7 +16,7 @@ import 'package:google_maps/google_maps.dart' as gmaps; typedef ClusterClickHandler = void Function( gmaps.MapMouseEvent, MarkerClustererCluster, - gmaps.GMap, + gmaps.Map, ); /// The [MarkerClustererOptions] object used to initialize [MarkerClusterer]. @@ -27,7 +27,7 @@ typedef ClusterClickHandler = void Function( extension type MarkerClustererOptions._(JSObject _) implements JSObject { /// Constructs a new [MarkerClustererOptions] object. factory MarkerClustererOptions({ - gmaps.GMap? map, + gmaps.Map? map, List? markers, ClusterClickHandler? onClusterClick, }) => @@ -37,7 +37,7 @@ extension type MarkerClustererOptions._(JSObject _) implements JSObject { onClusterClick: onClusterClick != null ? ((JSAny event, MarkerClustererCluster cluster, JSAny map) => onClusterClick(event as gmaps.MapMouseEvent, cluster, - map as gmaps.GMap)).toJS + map as gmaps.Map)).toJS : null, ); @@ -47,8 +47,8 @@ extension type MarkerClustererOptions._(JSObject _) implements JSObject { JSFunction? onClusterClick, }); - /// Returns the [gmaps.GMap] object. - gmaps.GMap? get map => _map as gmaps.GMap?; + /// Returns the [gmaps.Map] object. + gmaps.Map? get map => _map as gmaps.Map?; @JS('map') external JSAny? get _map; @@ -152,10 +152,10 @@ extension type MarkerClusterer._(JSObject _) implements JSObject { external void render(); } -/// Creates [MarkerClusterer] object with given [gmaps.GMap] and +/// Creates [MarkerClusterer] object with given [gmaps.Map] and /// [ClusterClickHandler]. MarkerClusterer createMarkerClusterer( - gmaps.GMap map, ClusterClickHandler onClusterClickHandler) { + gmaps.Map map, ClusterClickHandler onClusterClickHandler) { final MarkerClustererOptions options = MarkerClustererOptions( map: map, onClusterClick: onClusterClickHandler, diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart index 8bcf8b7f942..f5204403528 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart @@ -60,7 +60,7 @@ class MarkersController extends GeometryController { final gmaps.Marker gmMarker = gmaps.Marker(markerOptions); - gmMarker.set('markerId', marker.markerId.value); + gmMarker.set('markerId', marker.markerId.value.toJS); if (marker.clusterManagerId != null) { _clusterManagersController.addItem(marker.clusterManagerId!, gmMarker); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/overlay.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/overlay.dart index 29823d00b9f..1b4de3e9f4c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/overlay.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/overlay.dart @@ -49,7 +49,7 @@ class TileOverlayController { img.setAttribute('decoding', 'async'); _tileOverlay.tileProvider! - .getTile(tileCoord!.x!.toInt(), tileCoord.y!.toInt(), zoom?.toInt()) + .getTile(tileCoord!.x.toInt(), tileCoord.y.toInt(), zoom?.toInt()) .then((Tile tile) { if (tile.data == null) { return; diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/overlays.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/overlays.dart index 26c6a7573a4..59015a4e4b9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/overlays.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/overlays.dart @@ -19,7 +19,7 @@ class TileOverlaysController extends GeometryController { tileOverlayController, (TileOverlayController c) => c.tileOverlay.zIndex); - googleMap.overlayMapTypes!.insertAt(index, tileOverlayController.gmMapType); + googleMap.overlayMapTypes.insertAt(index, tileOverlayController.gmMapType); _visibleTileOverlays.insert(index, tileOverlayController); } @@ -30,7 +30,7 @@ class TileOverlaysController extends GeometryController { return; } - googleMap.overlayMapTypes!.removeAt(index); + googleMap.overlayMapTypes.removeAt(index); _visibleTileOverlays.removeAt(index); } @@ -93,7 +93,7 @@ class TileOverlaysController extends GeometryController { if (controller != null && controller.tileOverlay.visible) { final int i = _visibleTileOverlays.indexOf(controller); // This causes the map to reload the overlay. - googleMap.overlayMapTypes!.setAt(i, controller.gmMapType); + googleMap.overlayMapTypes.setAt(i, controller.gmMapType); } } } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/third_party/to_screen_location/to_screen_location.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/third_party/to_screen_location/to_screen_location.dart index fc25b18b43e..ead29d4fcb0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/third_party/to_screen_location/to_screen_location.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/third_party/to_screen_location/to_screen_location.dart @@ -28,8 +28,7 @@ import 'package:google_maps/google_maps.dart' as gmaps; /// (not of the whole screen/app). /// /// See: https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/Projection#public-point-toscreenlocation-latlng-location -gmaps.Point toScreenLocation(gmaps.GMap map, gmaps.LatLng coords) { - final num? zoom = map.zoom; +gmaps.Point toScreenLocation(gmaps.Map map, gmaps.LatLng coords) { final gmaps.LatLngBounds? bounds = map.bounds; final gmaps.Projection? projection = map.projection; @@ -37,21 +36,23 @@ gmaps.Point toScreenLocation(gmaps.GMap map, gmaps.LatLng coords) { bounds != null, 'Map Bounds required to compute screen x/y of LatLng.'); assert(projection != null, 'Map Projection required to compute screen x/y of LatLng.'); - assert(zoom != null, + assert(map.isZoomDefined(), 'Current map zoom level required to compute screen x/y of LatLng.'); + final num zoom = map.zoom; + final gmaps.LatLng ne = bounds!.northEast; final gmaps.LatLng sw = bounds.southWest; - final gmaps.Point topRight = projection!.fromLatLngToPoint!(ne)!; - final gmaps.Point bottomLeft = projection.fromLatLngToPoint!(sw)!; + final gmaps.Point topRight = projection!.fromLatLngToPoint(ne)!; + final gmaps.Point bottomLeft = projection.fromLatLngToPoint(sw)!; - final int scale = 1 << (zoom!.toInt()); // 2 ^ zoom + final int scale = 1 << (zoom.toInt()); // 2 ^ zoom - final gmaps.Point worldPoint = projection.fromLatLngToPoint!(coords)!; + final gmaps.Point worldPoint = projection.fromLatLngToPoint(coords)!; return gmaps.Point( - ((worldPoint.x! - bottomLeft.x!) * scale).toInt(), - ((worldPoint.y! - topRight.y!) * scale).toInt(), + ((worldPoint.x - bottomLeft.x) * scale).toInt(), + ((worldPoint.y - topRight.y) * scale).toInt(), ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/types.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/types.dart index d4e87799f4b..1eec81a4f1e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/types.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/types.dart @@ -14,17 +14,17 @@ typedef LatLngCallback = void Function(gmaps.LatLng latLng); /// The base class for all "geometry" group controllers. /// /// This lets all Geometry controllers ([MarkersController], [CirclesController], -/// [PolygonsController], [PolylinesController]) to be bound to a [gmaps.GMap] +/// [PolygonsController], [PolylinesController]) to be bound to a [gmaps.Map] /// instance and our internal `mapId` value. abstract class GeometryController { /// The GMap instance that this controller operates on. - late gmaps.GMap googleMap; + late gmaps.Map googleMap; /// The map ID for events. late int mapId; - /// Binds a `mapId` and the [gmaps.GMap] instance to this controller. - void bindToMap(int mapId, gmaps.GMap googleMap) { + /// Binds a `mapId` and the [gmaps.Map] instance to this controller. + void bindToMap(int mapId, gmaps.Map googleMap) { this.mapId = mapId; this.googleMap = googleMap; } 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 76707dd7c1e..ce1a3f87f0c 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.8 +version: 0.5.9 environment: sdk: ^3.3.0 @@ -22,7 +22,7 @@ dependencies: sdk: flutter flutter_web_plugins: sdk: flutter - google_maps: ^7.1.0 + google_maps: ^8.0.0-dev.1 google_maps_flutter_platform_interface: ^2.7.0 sanitize_html: ^2.0.0 stream_transform: ^2.0.0 @@ -32,6 +32,13 @@ dev_dependencies: flutter_test: sdk: flutter +# FOR TESTING ONLY. DO NOT MERGE. +dependency_overrides: + google_maps: + git: + url: https://github.com/a14n/dart-google-maps + ref: 0f57b7d99ed9652a31cd60a5dd4f3c6cb6b9f31a + topics: - google-maps - google-maps-flutter diff --git a/script/configs/exclude_all_packages_app_wasm.yaml b/script/configs/exclude_all_packages_app_wasm.yaml index 2f96224d678..cad06d3043a 100644 --- a/script/configs/exclude_all_packages_app_wasm.yaml +++ b/script/configs/exclude_all_packages_app_wasm.yaml @@ -9,6 +9,3 @@ # https://github.com/flutter/flutter/issues/117022 - camera -# Dependencies are not migrated yet -# https://github.com/flutter/flutter/issues/148624 -- google_maps_flutter