Skip to content

Commit 5e66578

Browse files
committed
Assert that (legacy) marker's icon is not a PinConfig
1 parent bfa5b44 commit 5e66578

File tree

1 file changed

+5
-1
lines changed
  • packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types

1 file changed

+5
-1
lines changed

packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ class Marker implements MapsObject<Marker> {
160160
this.onDrag,
161161
this.onDragStart,
162162
this.onDragEnd,
163-
}) : assert(0.0 <= alpha && alpha <= 1.0);
163+
}) : assert(0.0 <= alpha && alpha <= 1.0),
164+
assert(
165+
icon is! PinConfig,
166+
'Icon must not be a PinConfig. PinConfig is only supported by AdvancedMarker.',
167+
);
164168

165169
/// Uniquely identifies a [Marker].
166170
final MarkerId markerId;

0 commit comments

Comments
 (0)