diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/tile_overlay.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/tile_overlay.dart index 8ae3b3bca979..a01f6b02d6d6 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/tile_overlay.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/tile_overlay.dart @@ -67,8 +67,8 @@ class TileOverlayBodyState extends State { @override Widget build(BuildContext context) { - Set overlays = { - if (_tileOverlay != null) _tileOverlay, + Set overlays = { + if (_tileOverlay != null) _tileOverlay!, }; return Column( mainAxisSize: MainAxisSize.min, @@ -84,7 +84,7 @@ class TileOverlayBodyState extends State { target: LatLng(59.935460, 30.325177), zoom: 7.0, ), - tileOverlays: overlays as Set, + tileOverlays: overlays, onMapCreated: _onMapCreated, ), ), diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/tile_overlay.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/tile_overlay.dart index e31bfb461fb4..fc582d51c209 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/tile_overlay.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/tile_overlay.dart @@ -91,6 +91,7 @@ class TileOverlay implements MapsObject { /// unless overwritten by the specified parameters. TileOverlay copyWith({ bool? fadeInParam, + TileProvider? tileProviderParam, double? transparencyParam, int? zIndexParam, bool? visibleParam, @@ -99,6 +100,7 @@ class TileOverlay implements MapsObject { return TileOverlay( tileOverlayId: tileOverlayId, fadeIn: fadeInParam ?? fadeIn, + tileProvider: tileProviderParam ?? tileProvider, transparency: transparencyParam ?? transparency, zIndex: zIndexParam ?? zIndex, visible: visibleParam ?? visible,