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 {
98
98
99
99
addIfPresent ('markerId' , markerId.value);
100
100
addIfPresent ('alpha' , alpha);
101
- addIfPresent ('anchor' , offsetToJson (anchor));
101
+ addIfPresent ('anchor' , _offsetToJson (anchor));
102
102
addIfPresent ('consumeTapEvents' , consumeTapEvents);
103
103
addIfPresent ('draggable' , draggable);
104
104
addIfPresent ('flat' , flat);
@@ -168,3 +168,8 @@ enum MarkerCollisionBehavior {
168
168
/// the marker.
169
169
requiredAndHidesOptional,
170
170
}
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'
10
10
import 'types.dart' ;
11
11
12
12
/// Convert [Offset] to JSON object.
13
- Object offsetToJson (Offset offset) {
13
+ Object _offsetToJson (Offset offset) {
14
14
return < Object > [offset.dx, offset.dy];
15
15
}
16
16
@@ -77,7 +77,7 @@ class InfoWindow {
77
77
78
78
addIfPresent ('title' , title);
79
79
addIfPresent ('snippet' , snippet);
80
- addIfPresent ('anchor' , offsetToJson (anchor));
80
+ addIfPresent ('anchor' , _offsetToJson (anchor));
81
81
82
82
return json;
83
83
}
@@ -295,7 +295,7 @@ class Marker implements MapsObject<Marker> {
295
295
296
296
addIfPresent ('markerId' , markerId.value);
297
297
addIfPresent ('alpha' , alpha);
298
- addIfPresent ('anchor' , offsetToJson (anchor));
298
+ addIfPresent ('anchor' , _offsetToJson (anchor));
299
299
addIfPresent ('consumeTapEvents' , consumeTapEvents);
300
300
addIfPresent ('draggable' , draggable);
301
301
addIfPresent ('flat' , flat);
You can’t perform that action at this time.
0 commit comments