From f73c24d546f5e959f4029bebce9a099daf8484e9 Mon Sep 17 00:00:00 2001 From: David Iglesias Teixeira Date: Tue, 4 Feb 2025 17:49:02 -0800 Subject: [PATCH] Help web integration tests pass. * Update mocks (they had drifted with the latest changes) * Make Markers/Clustering target types less specific (remove extends JSObject) so mockito can mock them. --- .../google_maps_controller_test.mocks.dart | 661 +++++++++++------- .../google_maps_plugin_test.mocks.dart | 456 +++++++----- .../integration_test/overlays_test.mocks.dart | 58 +- .../lib/src/marker_clustering.dart | 5 +- .../lib/src/marker_clustering_js_interop.dart | 13 +- .../lib/src/markers.dart | 6 +- 6 files changed, 749 insertions(+), 450 deletions(-) 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 75b42c88c953..97cc5f26c8e0 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 @@ -1,15 +1,18 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in google_maps_flutter_web_integration_tests/integration_test/google_maps_controller_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i4; +import 'dart:async' as _i6; +import 'package:google_maps/google_maps.dart' as _i4; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart' 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 @@ -18,7 +21,6 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types @@ -26,8 +28,13 @@ import 'package:mockito/mockito.dart' as _i1; class _FakeMarkerController_0 extends _i1.SmartFake implements _i2.MarkerController { - _FakeMarkerController_0(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeMarkerController_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [CirclesController]. @@ -35,59 +42,87 @@ class _FakeMarkerController_0 extends _i1.SmartFake /// See the documentation for Mockito's code generation for more information. class MockCirclesController extends _i1.Mock implements _i2.CirclesController { @override - Map<_i3.CircleId, _i2.CircleController> get circles => - (super.noSuchMethod( - Invocation.getter(#circles), - returnValue: <_i3.CircleId, _i2.CircleController>{}, - returnValueForMissingStub: <_i3.CircleId, _i2.CircleController>{}, - ) - as Map<_i3.CircleId, _i2.CircleController>); + Map<_i3.CircleId, _i2.CircleController> get circles => (super.noSuchMethod( + Invocation.getter(#circles), + returnValue: <_i3.CircleId, _i2.CircleController>{}, + returnValueForMissingStub: <_i3.CircleId, _i2.CircleController>{}, + ) as Map<_i3.CircleId, _i2.CircleController>); @override - set googleMap(dynamic _googleMap) => super.noSuchMethod( - Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null, - ); + _i4.Map get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); @override - int get mapId => - (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) - as int); + 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(#mapId, _mapId), - returnValueForMissingStub: null, - ); + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); @override void addCircles(Set<_i3.Circle>? circlesToAdd) => super.noSuchMethod( - Invocation.method(#addCircles, [circlesToAdd]), - returnValueForMissingStub: null, - ); + Invocation.method( + #addCircles, + [circlesToAdd], + ), + returnValueForMissingStub: null, + ); @override void changeCircles(Set<_i3.Circle>? circlesToChange) => super.noSuchMethod( - Invocation.method(#changeCircles, [circlesToChange]), - returnValueForMissingStub: null, - ); + Invocation.method( + #changeCircles, + [circlesToChange], + ), + returnValueForMissingStub: null, + ); @override void removeCircles(Set<_i3.CircleId>? circleIdsToRemove) => super.noSuchMethod( - Invocation.method(#removeCircles, [circleIdsToRemove]), + Invocation.method( + #removeCircles, + [circleIdsToRemove], + ), returnValueForMissingStub: null, ); @override - void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( - Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null, - ); + void bindToMap( + int? mapId, + _i4.Map? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [HeatmapsController]. @@ -96,59 +131,87 @@ class MockCirclesController extends _i1.Mock implements _i2.CirclesController { class MockHeatmapsController extends _i1.Mock implements _i2.HeatmapsController { @override - Map<_i3.HeatmapId, _i2.HeatmapController> get heatmaps => - (super.noSuchMethod( - Invocation.getter(#heatmaps), - returnValue: <_i3.HeatmapId, _i2.HeatmapController>{}, - returnValueForMissingStub: <_i3.HeatmapId, _i2.HeatmapController>{}, - ) - as Map<_i3.HeatmapId, _i2.HeatmapController>); + Map<_i3.HeatmapId, _i2.HeatmapController> get heatmaps => (super.noSuchMethod( + Invocation.getter(#heatmaps), + returnValue: <_i3.HeatmapId, _i2.HeatmapController>{}, + returnValueForMissingStub: <_i3.HeatmapId, _i2.HeatmapController>{}, + ) as Map<_i3.HeatmapId, _i2.HeatmapController>); @override - set googleMap(dynamic _googleMap) => super.noSuchMethod( - Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null, - ); + _i4.Map get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); @override - int get mapId => - (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) - as int); + 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(#mapId, _mapId), - returnValueForMissingStub: null, - ); + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); @override void addHeatmaps(Set<_i3.Heatmap>? heatmapsToAdd) => super.noSuchMethod( - Invocation.method(#addHeatmaps, [heatmapsToAdd]), - returnValueForMissingStub: null, - ); + Invocation.method( + #addHeatmaps, + [heatmapsToAdd], + ), + returnValueForMissingStub: null, + ); @override void changeHeatmaps(Set<_i3.Heatmap>? heatmapsToChange) => super.noSuchMethod( - Invocation.method(#changeHeatmaps, [heatmapsToChange]), - returnValueForMissingStub: null, - ); + Invocation.method( + #changeHeatmaps, + [heatmapsToChange], + ), + returnValueForMissingStub: null, + ); @override void removeHeatmaps(Set<_i3.HeatmapId>? heatmapIdsToRemove) => super.noSuchMethod( - Invocation.method(#removeHeatmaps, [heatmapIdsToRemove]), + Invocation.method( + #removeHeatmaps, + [heatmapIdsToRemove], + ), returnValueForMissingStub: null, ); @override - void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( - Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null, - ); + void bindToMap( + int? mapId, + _i4.Map? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [PolygonsController]. @@ -157,59 +220,87 @@ class MockHeatmapsController extends _i1.Mock class MockPolygonsController extends _i1.Mock implements _i2.PolygonsController { @override - Map<_i3.PolygonId, _i2.PolygonController> get polygons => - (super.noSuchMethod( - Invocation.getter(#polygons), - returnValue: <_i3.PolygonId, _i2.PolygonController>{}, - returnValueForMissingStub: <_i3.PolygonId, _i2.PolygonController>{}, - ) - as Map<_i3.PolygonId, _i2.PolygonController>); + Map<_i3.PolygonId, _i2.PolygonController> get polygons => (super.noSuchMethod( + Invocation.getter(#polygons), + returnValue: <_i3.PolygonId, _i2.PolygonController>{}, + returnValueForMissingStub: <_i3.PolygonId, _i2.PolygonController>{}, + ) as Map<_i3.PolygonId, _i2.PolygonController>); @override - set googleMap(dynamic _googleMap) => super.noSuchMethod( - Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null, - ); + _i4.Map get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); @override - int get mapId => - (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) - as int); + 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(#mapId, _mapId), - returnValueForMissingStub: null, - ); + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); @override void addPolygons(Set<_i3.Polygon>? polygonsToAdd) => super.noSuchMethod( - Invocation.method(#addPolygons, [polygonsToAdd]), - returnValueForMissingStub: null, - ); + Invocation.method( + #addPolygons, + [polygonsToAdd], + ), + returnValueForMissingStub: null, + ); @override void changePolygons(Set<_i3.Polygon>? polygonsToChange) => super.noSuchMethod( - Invocation.method(#changePolygons, [polygonsToChange]), - returnValueForMissingStub: null, - ); + Invocation.method( + #changePolygons, + [polygonsToChange], + ), + returnValueForMissingStub: null, + ); @override void removePolygons(Set<_i3.PolygonId>? polygonIdsToRemove) => super.noSuchMethod( - Invocation.method(#removePolygons, [polygonIdsToRemove]), + Invocation.method( + #removePolygons, + [polygonIdsToRemove], + ), returnValueForMissingStub: null, ); @override - void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( - Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null, - ); + void bindToMap( + int? mapId, + _i4.Map? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [PolylinesController]. @@ -218,61 +309,88 @@ class MockPolygonsController extends _i1.Mock class MockPolylinesController extends _i1.Mock implements _i2.PolylinesController { @override - Map<_i3.PolylineId, _i2.PolylineController> get lines => - (super.noSuchMethod( - Invocation.getter(#lines), - returnValue: <_i3.PolylineId, _i2.PolylineController>{}, - returnValueForMissingStub: - <_i3.PolylineId, _i2.PolylineController>{}, - ) - as Map<_i3.PolylineId, _i2.PolylineController>); + Map<_i3.PolylineId, _i2.PolylineController> get lines => (super.noSuchMethod( + Invocation.getter(#lines), + returnValue: <_i3.PolylineId, _i2.PolylineController>{}, + returnValueForMissingStub: <_i3.PolylineId, _i2.PolylineController>{}, + ) as Map<_i3.PolylineId, _i2.PolylineController>); @override - set googleMap(dynamic _googleMap) => super.noSuchMethod( - Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null, - ); + _i4.Map get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); @override - int get mapId => - (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) - as int); + 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(#mapId, _mapId), - returnValueForMissingStub: null, - ); + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); @override void addPolylines(Set<_i3.Polyline>? polylinesToAdd) => super.noSuchMethod( - Invocation.method(#addPolylines, [polylinesToAdd]), - returnValueForMissingStub: null, - ); + Invocation.method( + #addPolylines, + [polylinesToAdd], + ), + returnValueForMissingStub: null, + ); @override void changePolylines(Set<_i3.Polyline>? polylinesToChange) => super.noSuchMethod( - Invocation.method(#changePolylines, [polylinesToChange]), + Invocation.method( + #changePolylines, + [polylinesToChange], + ), returnValueForMissingStub: null, ); @override void removePolylines(Set<_i3.PolylineId>? polylineIdsToRemove) => super.noSuchMethod( - Invocation.method(#removePolylines, [polylineIdsToRemove]), + Invocation.method( + #removePolylines, + [polylineIdsToRemove], + ), returnValueForMissingStub: null, ); @override - void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( - Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null, - ); + void bindToMap( + int? mapId, + _i4.Map? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [MarkersController]. @@ -283,123 +401,161 @@ class MockMarkersController extends _i1.Mock @override Map<_i3.MarkerId, _i2.MarkerController> get markers => (super.noSuchMethod( - Invocation.getter(#markers), - returnValue: - <_i3.MarkerId, _i2.MarkerController>{}, - returnValueForMissingStub: - <_i3.MarkerId, _i2.MarkerController>{}, - ) - as Map<_i3.MarkerId, _i2.MarkerController>); + Invocation.getter(#markers), + returnValue: <_i3.MarkerId, _i2.MarkerController>{}, + returnValueForMissingStub: <_i3.MarkerId, + _i2.MarkerController>{}, + ) as Map<_i3.MarkerId, _i2.MarkerController>); @override - set googleMap(dynamic _googleMap) => super.noSuchMethod( - Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null, - ); + _i4.Map get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); @override - int get mapId => - (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) - as int); + 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(#mapId, _mapId), - returnValueForMissingStub: null, - ); + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); @override - _i4.Future addMarkers(Set<_i3.Marker>? markersToAdd) => + _i6.Future addMarkers(Set<_i3.Marker>? markersToAdd) => (super.noSuchMethod( - Invocation.method(#addMarkers, [markersToAdd]), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) - as _i4.Future); + Invocation.method( + #addMarkers, + [markersToAdd], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i4.Future<_i2.MarkerController> createMarkerController( + _i6.Future<_i2.MarkerController> createMarkerController( _i3.Marker? marker, Object? currentMarker, dynamic gmInfoWindow, ) => (super.noSuchMethod( - Invocation.method(#createMarkerController, [ + Invocation.method( + #createMarkerController, + [ + marker, + currentMarker, + gmInfoWindow, + ], + ), + returnValue: _i6.Future<_i2.MarkerController>.value( + _FakeMarkerController_0( + this, + Invocation.method( + #createMarkerController, + [ + marker, + currentMarker, + gmInfoWindow, + ], + ), + )), + returnValueForMissingStub: + _i6.Future<_i2.MarkerController>.value( + _FakeMarkerController_0( + this, + Invocation.method( + #createMarkerController, + [ marker, currentMarker, gmInfoWindow, - ]), - returnValue: - _i4.Future<_i2.MarkerController>.value( - _FakeMarkerController_0( - this, - Invocation.method(#createMarkerController, [ - marker, - currentMarker, - gmInfoWindow, - ]), - ), - ), - returnValueForMissingStub: - _i4.Future<_i2.MarkerController>.value( - _FakeMarkerController_0( - this, - Invocation.method(#createMarkerController, [ - marker, - currentMarker, - gmInfoWindow, - ]), - ), - ), - ) - as _i4.Future<_i2.MarkerController>); - - @override - _i4.Future changeMarkers(Set<_i3.Marker>? markersToChange) => + ], + ), + )), + ) as _i6.Future<_i2.MarkerController>); + + @override + _i6.Future changeMarkers(Set<_i3.Marker>? markersToChange) => (super.noSuchMethod( - Invocation.method(#changeMarkers, [markersToChange]), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) - as _i4.Future); + Invocation.method( + #changeMarkers, + [markersToChange], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override void removeMarkers(Set<_i3.MarkerId>? markerIdsToRemove) => super.noSuchMethod( - Invocation.method(#removeMarkers, [markerIdsToRemove]), + Invocation.method( + #removeMarkers, + [markerIdsToRemove], + ), returnValueForMissingStub: null, ); @override void showMarkerInfoWindow(_i3.MarkerId? markerId) => super.noSuchMethod( - Invocation.method(#showMarkerInfoWindow, [markerId]), - returnValueForMissingStub: null, - ); + Invocation.method( + #showMarkerInfoWindow, + [markerId], + ), + returnValueForMissingStub: null, + ); @override void hideMarkerInfoWindow(_i3.MarkerId? markerId) => super.noSuchMethod( - Invocation.method(#hideMarkerInfoWindow, [markerId]), - returnValueForMissingStub: null, - ); + Invocation.method( + #hideMarkerInfoWindow, + [markerId], + ), + returnValueForMissingStub: null, + ); @override - bool isInfoWindowShown(_i3.MarkerId? markerId) => - (super.noSuchMethod( - Invocation.method(#isInfoWindowShown, [markerId]), - returnValue: false, - returnValueForMissingStub: false, - ) - as bool); + bool isInfoWindowShown(_i3.MarkerId? markerId) => (super.noSuchMethod( + Invocation.method( + #isInfoWindowShown, + [markerId], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); @override - void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( - Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null, - ); + void bindToMap( + int? mapId, + _i4.Map? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [TileOverlaysController]. @@ -408,56 +564,89 @@ class MockMarkersController extends _i1.Mock class MockTileOverlaysController extends _i1.Mock implements _i2.TileOverlaysController { @override - set googleMap(dynamic _googleMap) => super.noSuchMethod( - Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null, - ); + _i4.Map get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); @override - int get mapId => - (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) - as int); + 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(#mapId, _mapId), - returnValueForMissingStub: null, - ); + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); @override void addTileOverlays(Set<_i3.TileOverlay>? tileOverlaysToAdd) => super.noSuchMethod( - Invocation.method(#addTileOverlays, [tileOverlaysToAdd]), + Invocation.method( + #addTileOverlays, + [tileOverlaysToAdd], + ), returnValueForMissingStub: null, ); @override void changeTileOverlays(Set<_i3.TileOverlay>? tileOverlays) => super.noSuchMethod( - Invocation.method(#changeTileOverlays, [tileOverlays]), + Invocation.method( + #changeTileOverlays, + [tileOverlays], + ), returnValueForMissingStub: null, ); @override void removeTileOverlays(Set<_i3.TileOverlayId>? tileOverlayIds) => super.noSuchMethod( - Invocation.method(#removeTileOverlays, [tileOverlayIds]), + Invocation.method( + #removeTileOverlays, + [tileOverlayIds], + ), returnValueForMissingStub: null, ); @override void clearTileCache(_i3.TileOverlayId? tileOverlayId) => super.noSuchMethod( - Invocation.method(#clearTileCache, [tileOverlayId]), - returnValueForMissingStub: null, - ); + Invocation.method( + #clearTileCache, + [tileOverlayId], + ), + returnValueForMissingStub: null, + ); @override - void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( - Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null, - ); + void bindToMap( + int? mapId, + _i4.Map? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } 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 d140da9fce6c..c1f4625018c6 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 @@ -1,11 +1,11 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in google_maps_flutter_web_integration_tests/integration_test/google_maps_plugin_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; -import 'dart:js_interop' as _i5; +import 'package:google_maps/google_maps.dart' as _i5; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart' as _i2; import 'package:google_maps_flutter_web/google_maps_flutter_web.dart' as _i4; @@ -20,7 +20,6 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types @@ -28,30 +27,55 @@ import 'package:mockito/mockito.dart' as _i1; class _FakeMapConfiguration_0 extends _i1.SmartFake implements _i2.MapConfiguration { - _FakeMapConfiguration_0(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeMapConfiguration_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeStreamController_1 extends _i1.SmartFake implements _i3.StreamController { - _FakeStreamController_1(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeStreamController_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeLatLngBounds_2 extends _i1.SmartFake implements _i2.LatLngBounds { - _FakeLatLngBounds_2(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeLatLngBounds_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeScreenCoordinate_3 extends _i1.SmartFake implements _i2.ScreenCoordinate { - _FakeScreenCoordinate_3(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeScreenCoordinate_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeLatLng_4 extends _i1.SmartFake implements _i2.LatLng { - _FakeLatLng_4(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeLatLng_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [GoogleMapController]. @@ -60,270 +84,324 @@ class _FakeLatLng_4 extends _i1.SmartFake implements _i2.LatLng { class MockGoogleMapController extends _i1.Mock implements _i4.GoogleMapController { @override - _i2.MapConfiguration get configuration => - (super.noSuchMethod( - Invocation.getter(#configuration), - returnValue: _FakeMapConfiguration_0( - this, - Invocation.getter(#configuration), - ), - returnValueForMissingStub: _FakeMapConfiguration_0( - this, - Invocation.getter(#configuration), - ), - ) - as _i2.MapConfiguration); + _i2.MapConfiguration get configuration => (super.noSuchMethod( + Invocation.getter(#configuration), + returnValue: _FakeMapConfiguration_0( + this, + Invocation.getter(#configuration), + ), + returnValueForMissingStub: _FakeMapConfiguration_0( + this, + Invocation.getter(#configuration), + ), + ) as _i2.MapConfiguration); @override - _i3.StreamController<_i2.MapEvent> get stream => - (super.noSuchMethod( - Invocation.getter(#stream), - returnValue: _FakeStreamController_1<_i2.MapEvent>( - this, - Invocation.getter(#stream), - ), - returnValueForMissingStub: - _FakeStreamController_1<_i2.MapEvent>( - this, - Invocation.getter(#stream), - ), - ) - as _i3.StreamController<_i2.MapEvent>); + _i3.StreamController<_i2.MapEvent> get stream => (super.noSuchMethod( + Invocation.getter(#stream), + returnValue: _FakeStreamController_1<_i2.MapEvent>( + this, + Invocation.getter(#stream), + ), + returnValueForMissingStub: + _FakeStreamController_1<_i2.MapEvent>( + this, + Invocation.getter(#stream), + ), + ) as _i3.StreamController<_i2.MapEvent>); @override - _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>); + _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>); @override - bool get isInitialized => - (super.noSuchMethod( - Invocation.getter(#isInitialized), - returnValue: false, - returnValueForMissingStub: false, - ) - as bool); + bool get isInitialized => (super.noSuchMethod( + Invocation.getter(#isInitialized), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); @override - List get styles => - (super.noSuchMethod( - Invocation.getter(#styles), - returnValue: [], - returnValueForMissingStub: [], - ) - as List); + 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, _i4.DebugSetOptionsFunction? setOptions, - _i4.MarkersController<_i5.JSObject, Object>? markers, + _i4.MarkersController? markers, _i4.CirclesController? circles, _i4.HeatmapsController? heatmaps, _i4.PolygonsController? polygons, _i4.PolylinesController? polylines, _i6.ClusterManagersController? clusterManagers, _i4.TileOverlaysController? tileOverlays, - }) => super.noSuchMethod( - Invocation.method(#debugSetOverrides, [], { - #createMap: createMap, - #setOptions: setOptions, - #markers: markers, - #circles: circles, - #heatmaps: heatmaps, - #polygons: polygons, - #polylines: polylines, - #clusterManagers: clusterManagers, - #tileOverlays: tileOverlays, - }), - returnValueForMissingStub: null, - ); + }) => + super.noSuchMethod( + Invocation.method( + #debugSetOverrides, + [], + { + #createMap: createMap, + #setOptions: setOptions, + #markers: markers, + #circles: circles, + #heatmaps: heatmaps, + #polygons: polygons, + #polylines: polylines, + #clusterManagers: clusterManagers, + #tileOverlays: tileOverlays, + }, + ), + returnValueForMissingStub: null, + ); @override void init() => super.noSuchMethod( - Invocation.method(#init, []), - returnValueForMissingStub: null, - ); + Invocation.method( + #init, + [], + ), + returnValueForMissingStub: null, + ); @override void updateMapConfiguration(_i2.MapConfiguration? update) => super.noSuchMethod( - Invocation.method(#updateMapConfiguration, [update]), + Invocation.method( + #updateMapConfiguration, + [update], + ), returnValueForMissingStub: null, ); @override - void updateStyles(List? styles) => super.noSuchMethod( - Invocation.method(#updateStyles, [styles]), - returnValueForMissingStub: null, - ); + void updateStyles(List<_i5.MapTypeStyle>? styles) => super.noSuchMethod( + Invocation.method( + #updateStyles, + [styles], + ), + returnValueForMissingStub: null, + ); @override - _i3.Future<_i2.LatLngBounds> getVisibleRegion() => - (super.noSuchMethod( - Invocation.method(#getVisibleRegion, []), - returnValue: _i3.Future<_i2.LatLngBounds>.value( - _FakeLatLngBounds_2( - this, - Invocation.method(#getVisibleRegion, []), - ), - ), - returnValueForMissingStub: _i3.Future<_i2.LatLngBounds>.value( - _FakeLatLngBounds_2( - this, - Invocation.method(#getVisibleRegion, []), - ), - ), - ) - as _i3.Future<_i2.LatLngBounds>); + _i3.Future<_i2.LatLngBounds> getVisibleRegion() => (super.noSuchMethod( + Invocation.method( + #getVisibleRegion, + [], + ), + returnValue: _i3.Future<_i2.LatLngBounds>.value(_FakeLatLngBounds_2( + this, + Invocation.method( + #getVisibleRegion, + [], + ), + )), + returnValueForMissingStub: + _i3.Future<_i2.LatLngBounds>.value(_FakeLatLngBounds_2( + this, + Invocation.method( + #getVisibleRegion, + [], + ), + )), + ) as _i3.Future<_i2.LatLngBounds>); @override _i3.Future<_i2.ScreenCoordinate> getScreenCoordinate(_i2.LatLng? latLng) => (super.noSuchMethod( - Invocation.method(#getScreenCoordinate, [latLng]), - returnValue: _i3.Future<_i2.ScreenCoordinate>.value( - _FakeScreenCoordinate_3( - this, - Invocation.method(#getScreenCoordinate, [latLng]), - ), - ), - returnValueForMissingStub: _i3.Future<_i2.ScreenCoordinate>.value( - _FakeScreenCoordinate_3( - this, - Invocation.method(#getScreenCoordinate, [latLng]), - ), - ), - ) - as _i3.Future<_i2.ScreenCoordinate>); + Invocation.method( + #getScreenCoordinate, + [latLng], + ), + returnValue: + _i3.Future<_i2.ScreenCoordinate>.value(_FakeScreenCoordinate_3( + this, + Invocation.method( + #getScreenCoordinate, + [latLng], + ), + )), + returnValueForMissingStub: + _i3.Future<_i2.ScreenCoordinate>.value(_FakeScreenCoordinate_3( + this, + Invocation.method( + #getScreenCoordinate, + [latLng], + ), + )), + ) as _i3.Future<_i2.ScreenCoordinate>); @override _i3.Future<_i2.LatLng> getLatLng(_i2.ScreenCoordinate? screenCoordinate) => (super.noSuchMethod( - Invocation.method(#getLatLng, [screenCoordinate]), - returnValue: _i3.Future<_i2.LatLng>.value( - _FakeLatLng_4( - this, - Invocation.method(#getLatLng, [screenCoordinate]), - ), - ), - returnValueForMissingStub: _i3.Future<_i2.LatLng>.value( - _FakeLatLng_4( - this, - Invocation.method(#getLatLng, [screenCoordinate]), - ), - ), - ) - as _i3.Future<_i2.LatLng>); + Invocation.method( + #getLatLng, + [screenCoordinate], + ), + returnValue: _i3.Future<_i2.LatLng>.value(_FakeLatLng_4( + this, + Invocation.method( + #getLatLng, + [screenCoordinate], + ), + )), + returnValueForMissingStub: _i3.Future<_i2.LatLng>.value(_FakeLatLng_4( + this, + Invocation.method( + #getLatLng, + [screenCoordinate], + ), + )), + ) as _i3.Future<_i2.LatLng>); @override _i3.Future moveCamera(_i2.CameraUpdate? cameraUpdate) => (super.noSuchMethod( - Invocation.method(#moveCamera, [cameraUpdate]), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) - as _i3.Future); + Invocation.method( + #moveCamera, + [cameraUpdate], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); @override - _i3.Future getZoomLevel() => - (super.noSuchMethod( - Invocation.method(#getZoomLevel, []), - returnValue: _i3.Future.value(0.0), - returnValueForMissingStub: _i3.Future.value(0.0), - ) - as _i3.Future); + _i3.Future getZoomLevel() => (super.noSuchMethod( + Invocation.method( + #getZoomLevel, + [], + ), + 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(#updateCircles, [updates]), - returnValueForMissingStub: null, - ); + Invocation.method( + #updateCircles, + [updates], + ), + returnValueForMissingStub: null, + ); @override void updateHeatmaps(_i2.HeatmapUpdates? updates) => super.noSuchMethod( - Invocation.method(#updateHeatmaps, [updates]), - returnValueForMissingStub: null, - ); + Invocation.method( + #updateHeatmaps, + [updates], + ), + returnValueForMissingStub: null, + ); @override void updatePolygons(_i2.PolygonUpdates? updates) => super.noSuchMethod( - Invocation.method(#updatePolygons, [updates]), - returnValueForMissingStub: null, - ); + Invocation.method( + #updatePolygons, + [updates], + ), + returnValueForMissingStub: null, + ); @override void updatePolylines(_i2.PolylineUpdates? updates) => super.noSuchMethod( - Invocation.method(#updatePolylines, [updates]), - returnValueForMissingStub: null, - ); + Invocation.method( + #updatePolylines, + [updates], + ), + returnValueForMissingStub: null, + ); @override _i3.Future updateMarkers(_i2.MarkerUpdates? updates) => (super.noSuchMethod( - Invocation.method(#updateMarkers, [updates]), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) - as _i3.Future); + Invocation.method( + #updateMarkers, + [updates], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); @override void updateClusterManagers(_i2.ClusterManagerUpdates? updates) => super.noSuchMethod( - Invocation.method(#updateClusterManagers, [updates]), + Invocation.method( + #updateClusterManagers, + [updates], + ), returnValueForMissingStub: null, ); @override void updateTileOverlays(Set<_i2.TileOverlay>? newOverlays) => super.noSuchMethod( - Invocation.method(#updateTileOverlays, [newOverlays]), + Invocation.method( + #updateTileOverlays, + [newOverlays], + ), returnValueForMissingStub: null, ); @override void clearTileCache(_i2.TileOverlayId? id) => super.noSuchMethod( - Invocation.method(#clearTileCache, [id]), - returnValueForMissingStub: null, - ); + Invocation.method( + #clearTileCache, + [id], + ), + returnValueForMissingStub: null, + ); @override void showInfoWindow(_i2.MarkerId? markerId) => super.noSuchMethod( - Invocation.method(#showInfoWindow, [markerId]), - returnValueForMissingStub: null, - ); + Invocation.method( + #showInfoWindow, + [markerId], + ), + returnValueForMissingStub: null, + ); @override void hideInfoWindow(_i2.MarkerId? markerId) => super.noSuchMethod( - Invocation.method(#hideInfoWindow, [markerId]), - returnValueForMissingStub: null, - ); + Invocation.method( + #hideInfoWindow, + [markerId], + ), + returnValueForMissingStub: null, + ); @override - bool isInfoWindowShown(_i2.MarkerId? markerId) => - (super.noSuchMethod( - Invocation.method(#isInfoWindowShown, [markerId]), - returnValue: false, - returnValueForMissingStub: false, - ) - as bool); + bool isInfoWindowShown(_i2.MarkerId? markerId) => (super.noSuchMethod( + Invocation.method( + #isInfoWindowShown, + [markerId], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); @override - bool isAdvancedMarkersAvailable() => - (super.noSuchMethod( - Invocation.method(#isAdvancedMarkersAvailable, []), - returnValue: false, - returnValueForMissingStub: false, - ) - as bool); + bool isAdvancedMarkersAvailable() => (super.noSuchMethod( + Invocation.method( + #isAdvancedMarkersAvailable, + [], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), - returnValueForMissingStub: null, - ); + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.mocks.dart index 29d641f123b6..0480e644fe10 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in google_maps_flutter_web_integration_tests/integration_test/overlays_test.dart. // Do not manually edit this file. @@ -17,15 +17,19 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class class _FakeTile_0 extends _i1.SmartFake implements _i2.Tile { - _FakeTile_0(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeTile_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [TileProvider]. @@ -33,15 +37,41 @@ class _FakeTile_0 extends _i1.SmartFake implements _i2.Tile { /// See the documentation for Mockito's code generation for more information. class MockTileProvider extends _i1.Mock implements _i2.TileProvider { @override - _i3.Future<_i2.Tile> getTile(int? x, int? y, int? zoom) => + _i3.Future<_i2.Tile> getTile( + int? x, + int? y, + int? zoom, + ) => (super.noSuchMethod( - Invocation.method(#getTile, [x, y, zoom]), - returnValue: _i3.Future<_i2.Tile>.value( - _FakeTile_0(this, Invocation.method(#getTile, [x, y, zoom])), - ), - returnValueForMissingStub: _i3.Future<_i2.Tile>.value( - _FakeTile_0(this, Invocation.method(#getTile, [x, y, zoom])), - ), - ) - as _i3.Future<_i2.Tile>); + Invocation.method( + #getTile, + [ + x, + y, + zoom, + ], + ), + returnValue: _i3.Future<_i2.Tile>.value(_FakeTile_0( + this, + Invocation.method( + #getTile, + [ + x, + y, + zoom, + ], + ), + )), + returnValueForMissingStub: _i3.Future<_i2.Tile>.value(_FakeTile_0( + this, + Invocation.method( + #getTile, + [ + x, + y, + zoom, + ], + ), + )), + ) as _i3.Future<_i2.Tile>); } 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 606403b7d76f..0d3d83df4a97 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 @@ -17,7 +17,10 @@ import 'types.dart'; /// This class maps [ClusterManager] objects to javascript [MarkerClusterer] /// objects and provides an interface for adding and removing markers from /// clusters. -class ClusterManagersController extends GeometryController { +/// +/// [T] must extend [JSObject]. It's not specified in code because our mocking +/// framework does not support mocking JSObjects. +class ClusterManagersController extends GeometryController { /// Creates a new [ClusterManagersController] instance. /// /// The [stream] parameter is a required [StreamController] used for 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 797eaf6f2f3a..130c0774abd5 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 @@ -13,7 +13,7 @@ import 'dart:js_interop'; import 'package:google_maps/google_maps.dart' as gmaps; /// A typedef representing a callback function for handling cluster tap events. -typedef ClusterClickHandler = void Function( +typedef ClusterClickHandler = void Function( gmaps.MapMouseEvent, MarkerClustererCluster, gmaps.Map, @@ -24,8 +24,7 @@ typedef ClusterClickHandler = void Function( /// See: https://googlemaps.github.io/js-markerclusterer/interfaces/MarkerClustererOptions.html @JS() @anonymous -extension type MarkerClustererOptions._(JSObject _) - implements JSObject { +extension type MarkerClustererOptions._(JSObject _) implements JSObject { /// Constructs a new [MarkerClustererOptions] object. factory MarkerClustererOptions({ gmaps.Map? map, @@ -69,8 +68,7 @@ extension type MarkerClustererOptions._(JSObject _) /// /// https://googlemaps.github.io/js-markerclusterer/classes/Cluster.html @JS('markerClusterer.Cluster') -extension type MarkerClustererCluster._(JSObject _) - implements JSObject { +extension type MarkerClustererCluster._(JSObject _) implements JSObject { /// Getter for the cluster marker. T get marker => _marker as T; @JS('marker') @@ -107,8 +105,7 @@ extension type MarkerClustererCluster._(JSObject _) /// /// https://googlemaps.github.io/js-markerclusterer/classes/MarkerClusterer.html @JS('markerClusterer.MarkerClusterer') -extension type MarkerClusterer._(JSObject _) - implements JSObject { +extension type MarkerClusterer._(JSObject _) implements JSObject { /// Constructs a new [MarkerClusterer] object. external MarkerClusterer(MarkerClustererOptions options); @@ -156,7 +153,7 @@ extension type MarkerClusterer._(JSObject _) /// Creates [MarkerClusterer] object with given [gmaps.Map] and /// [ClusterClickHandler]. -MarkerClusterer createMarkerClusterer( +MarkerClusterer createMarkerClusterer( gmaps.Map map, ClusterClickHandler onClusterClickHandler) { final MarkerClustererOptions options = MarkerClustererOptions( map: map, 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 2f414333dc84..d4a123514f3a 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 @@ -10,8 +10,10 @@ part of '../google_maps_flutter_web.dart'; /// legacy [gmaps.Marker] class. /// * [AdvancedMarkersController] implements the [MarkersController] for the /// advanced [gmaps.AdvancedMarkerElement] class. -abstract class MarkersController - extends GeometryController { +/// +/// [T] must extend [JSObject]. It's not specified in code because our mocking +/// framework does not support mocking JSObjects. +abstract class MarkersController extends GeometryController { /// Initialize the cache. The [StreamController] comes from the [GoogleMapController], and is shared with other controllers. MarkersController({ required StreamController> stream,