diff --git a/packages/google_maps_flutter/google_maps_flutter/example/integration_test/src/maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter/example/integration_test/src/maps_controller.dart index 2ab5ffccccbc..536adc32f07d 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/integration_test/src/maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/integration_test/src/maps_controller.dart @@ -162,6 +162,8 @@ void runTests() { const String mapStyle = '[{"elementType":"geometry","stylers":[{"color":"#242f3e"}]}]'; + // Intentionally testing the deprecated code path. + // ignore: deprecated_member_use await controller.setMapStyle(mapStyle); }); @@ -184,6 +186,8 @@ void runTests() { final GoogleMapController controller = await controllerCompleter.future; try { + // Intentionally testing the deprecated code path. + // ignore: deprecated_member_use await controller.setMapStyle('invalid_value'); fail('expected MapStyleException'); } on MapStyleException catch (e) { @@ -208,6 +212,8 @@ void runTests() { ); final GoogleMapController controller = await controllerCompleter.future; + // Intentionally testing the deprecated code path. + // ignore: deprecated_member_use await controller.setMapStyle(null); }); @@ -471,6 +477,8 @@ void runTests() { final Set markers = { Marker( markerId: const MarkerId('1'), + // Intentionally testing the deprecated code path. + // ignore: deprecated_member_use icon: await BitmapDescriptor.fromAssetImage( imageConfiguration, 'assets/red_square.png', @@ -493,6 +501,8 @@ void runTests() { final Set markers = { Marker( markerId: const MarkerId('1'), + // Intentionally testing the deprecated code path. + // ignore: deprecated_member_use icon: BitmapDescriptor.fromBytes( bytes, size: const Size(100, 100), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart index 277010adfeba..666b48555811 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart @@ -1405,6 +1405,8 @@ void googleMapsTests() { final Set markers = { Marker( markerId: const MarkerId('1'), + // Intentionally testing the deprecated code path. + // ignore: deprecated_member_use icon: await BitmapDescriptor.fromAssetImage( imageConfiguration, 'assets/red_square.png', @@ -1427,6 +1429,8 @@ void googleMapsTests() { final Set markers = { Marker( markerId: const MarkerId('1'), + // Intentionally testing the deprecated code path. + // ignore: deprecated_member_use icon: BitmapDescriptor.fromBytes( bytes, size: const Size(100, 100), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index 038d5fe16d41..dd19bed86468 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -885,6 +885,8 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { case final DefaultMarker marker: return PlatformBitmap( bitmap: PlatformBitmapDefaultMarker(hue: marker.hue?.toDouble())); + // Clients may still use this deprecated format, so it must be supported. + // ignore: deprecated_member_use case final BytesBitmap bytes: return PlatformBitmap( bitmap: PlatformBitmapBytes( @@ -895,6 +897,8 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { case final AssetBitmap asset: return PlatformBitmap( bitmap: PlatformBitmapAsset(name: asset.name, pkg: asset.package)); + // Clients may still use this deprecated format, so it must be supported. + // ignore: deprecated_member_use case final AssetImageBitmap asset: return PlatformBitmap( bitmap: PlatformBitmapAssetImage( diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart index d3ea025d99c9..e2b5941d2618 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart @@ -1245,6 +1245,8 @@ void main() { final Set markers = { Marker( markerId: const MarkerId('1'), + // Intentionally testing the deprecated code path. + // ignore: deprecated_member_use icon: await BitmapDescriptor.fromAssetImage( imageConfiguration, 'assets/red_square.png', @@ -1268,6 +1270,8 @@ void main() { testWidgets('markerWithLegacyBytes', (WidgetTester tester) async { tester.view.devicePixelRatio = 2.0; final Uint8List bytes = const Base64Decoder().convert(iconImageBase64); + // Intentionally testing the deprecated code path. + // ignore: deprecated_member_use final BitmapDescriptor icon = BitmapDescriptor.fromBytes( bytes, ); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index ba56b6170fde..89c6b90ddc60 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -773,6 +773,8 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { case final DefaultMarker marker: return PlatformBitmap( bitmap: PlatformBitmapDefaultMarker(hue: marker.hue?.toDouble())); + // Clients may still use this deprecated format, so it must be supported. + // ignore: deprecated_member_use case final BytesBitmap bytes: final Size? size = bytes.size; return PlatformBitmap( @@ -782,6 +784,8 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { case final AssetBitmap asset: return PlatformBitmap( bitmap: PlatformBitmapAsset(name: asset.name, pkg: asset.package)); + // Clients may still use this deprecated format, so it must be supported. + // ignore: deprecated_member_use case final AssetImageBitmap asset: final Size? size = asset.size; return PlatformBitmap( 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 89f5e33e2387..cbc12bf562f2 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 @@ -194,9 +194,10 @@ class GoogleMapController { /// own configuration and are rendered on top of a GMap instance later. This /// happens in the second half of this method. /// - /// This method is eagerly called from the [GoogleMapsPlugin.buildView] method - /// so the internal [GoogleMapsController] of a Web Map initializes as soon as - /// possible. Check [_attachMapEvents] to see how this controller notifies the + /// This method is eagerly called from the + /// [GoogleMapsPlugin.buildViewWithConfiguration] method so the internal + /// [GoogleMapsController] of a Web Map initializes as soon as possible. + /// Check [_attachMapEvents] to see how this controller notifies the /// plugin of it being fully ready (through the `onTilesloaded.first` event). /// /// Failure to call this method would result in the GMap not rendering at all,