This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed
packages/google_maps_flutter Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.5.20+5
2
+
3
+ * Allow (de-)serialization of CameraPosition
4
+
1
5
## 0.5.20+4
2
6
3
7
* Marker drag event
Original file line number Diff line number Diff line change @@ -51,14 +51,13 @@ class CameraPosition {
51
51
/// will be silently clamped to the supported range.
52
52
final double zoom;
53
53
54
- dynamic _toMap () => < String , dynamic > {
54
+ dynamic toMap () => < String , dynamic > {
55
55
'bearing' : bearing,
56
56
'target' : target._toJson (),
57
57
'tilt' : tilt,
58
58
'zoom' : zoom,
59
59
};
60
60
61
- @visibleForTesting
62
61
static CameraPosition fromMap (dynamic json) {
63
62
if (json == null ) {
64
63
return null ;
@@ -98,7 +97,7 @@ class CameraUpdate {
98
97
/// Returns a camera update that moves the camera to the specified position.
99
98
static CameraUpdate newCameraPosition (CameraPosition cameraPosition) {
100
99
return CameraUpdate ._(
101
- < dynamic > ['newCameraPosition' , cameraPosition._toMap ()],
100
+ < dynamic > ['newCameraPosition' , cameraPosition.toMap ()],
102
101
);
103
102
}
104
103
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ class _GoogleMapState extends State<GoogleMap> {
192
192
@override
193
193
Widget build (BuildContext context) {
194
194
final Map <String , dynamic > creationParams = < String , dynamic > {
195
- 'initialCameraPosition' : widget.initialCameraPosition? ._toMap (),
195
+ 'initialCameraPosition' : widget.initialCameraPosition? .toMap (),
196
196
'options' : _googleMapOptions.toMap (),
197
197
'markersToAdd' : _serializeMarkerSet (widget.markers),
198
198
'polygonsToAdd' : _serializePolygonSet (widget.polygons),
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: google_maps_flutter
2
2
description : A Flutter plugin for integrating Google Maps in iOS and Android applications.
3
3
author :
Flutter Team <[email protected] >
4
4
homepage : https://github.com/flutter/plugins/tree/master/packages/google_maps_flutter
5
- version : 0.5.20+4
5
+ version : 0.5.20+5
6
6
7
7
dependencies :
8
8
flutter :
You can’t perform that action at this time.
0 commit comments