File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ class AdvancedMarker extends Marker {
9898
9999 addIfPresent ('markerId' , markerId.value);
100100 addIfPresent ('alpha' , alpha);
101- addIfPresent ('anchor' , offsetToJson (anchor));
101+ addIfPresent ('anchor' , _offsetToJson (anchor));
102102 addIfPresent ('consumeTapEvents' , consumeTapEvents);
103103 addIfPresent ('draggable' , draggable);
104104 addIfPresent ('flat' , flat);
@@ -168,3 +168,8 @@ enum MarkerCollisionBehavior {
168168 /// the marker.
169169 requiredAndHidesOptional,
170170}
171+
172+ /// Convert [Offset] to JSON object.
173+ Object _offsetToJson (Offset offset) {
174+ return < Object > [offset.dx, offset.dy];
175+ }
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import 'package:flutter/foundation.dart'
1010import 'types.dart' ;
1111
1212/// Convert [Offset] to JSON object.
13- Object offsetToJson (Offset offset) {
13+ Object _offsetToJson (Offset offset) {
1414 return < Object > [offset.dx, offset.dy];
1515}
1616
@@ -77,7 +77,7 @@ class InfoWindow {
7777
7878 addIfPresent ('title' , title);
7979 addIfPresent ('snippet' , snippet);
80- addIfPresent ('anchor' , offsetToJson (anchor));
80+ addIfPresent ('anchor' , _offsetToJson (anchor));
8181
8282 return json;
8383 }
@@ -295,7 +295,7 @@ class Marker implements MapsObject<Marker> {
295295
296296 addIfPresent ('markerId' , markerId.value);
297297 addIfPresent ('alpha' , alpha);
298- addIfPresent ('anchor' , offsetToJson (anchor));
298+ addIfPresent ('anchor' , _offsetToJson (anchor));
299299 addIfPresent ('consumeTapEvents' , consumeTapEvents);
300300 addIfPresent ('draggable' , draggable);
301301 addIfPresent ('flat' , flat);
You can’t perform that action at this time.
0 commit comments