Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

duzenko
Copy link
Contributor

@duzenko duzenko commented Jul 1, 2019

Description

Make CameraPosition.toMap public and change visibility of CameraPosition fromMap.
Intended use:

              final s = json.encode(lastPosition.toMap());
              prefs.setString('cameraPosition', s);
...
              final map = json.decode(prefs.get('cameraPosition'));
              final cam = CameraPosition.fromMap(map);
              await controller.moveCamera(CameraUpdate.newCameraPosition(cam));

Related Issues

Fixes flutter/flutter#34321

Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See [Contributor Guide]).
    Presumably none needed
  • All existing and new tests are passing.
    Impossible: [flutter_plugin_tools] 'format' crashes on Windows flutter#33964
  • I updated/added relevant documentation (doc comments with ///).
    None found
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the [Flutter Style Guide].
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • [] I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy].
    Pending review
  • I updated CHANGELOG.md to add a description of the change.
    Pending review
  • I signed the [CLA].
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@iskakaushik
Copy link
Contributor

Change looks good. Can you update the pubspec and changelog? Thanks!

…-cameraPosition-json

# Conflicts:
#	packages/google_maps_flutter/CHANGELOG.md
#	packages/google_maps_flutter/pubspec.yaml
@collinjackson collinjackson added the submit queue The Flutter team is in the process of landing this PR. label Aug 1, 2019
@iskakaushik
Copy link
Contributor

@duzenko I was busy with some issues in the past couple of weeks. Let me know if you get a change to fix the merge conflicts and we can merge this.

@duzenko

This comment has been minimized.

…on-json

# Conflicts:
#	packages/google_maps_flutter/CHANGELOG.md
#	packages/google_maps_flutter/pubspec.yaml
@duzenko

This comment has been minimized.

@iskakaushik
Copy link
Contributor

Now that marker drag events is in. Can you please rebase?

…on-json

# Conflicts:
#	packages/google_maps_flutter/CHANGELOG.md
@duzenko

This comment has been minimized.

@iskakaushik iskakaushik merged commit f31cb36 into flutter:master Aug 20, 2019
@iskakaushik
Copy link
Contributor

@duzenko I'm trying to figure out what is wrong with the plugin tools format to drive #1821 to green and get it merged. For the other PR it will get prioritized per the number of thumbs-up in the issues.

sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
…tter#1784)

* Allow (de-)serialization of CameraPosition

* Camera position toMap use fixes

* Updated the pubspec and changelog
julianscheel pushed a commit to jusst-engineering/plugins that referenced this pull request Mar 11, 2020
* Add macos to CI

* Add lint script
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes submit queue The Flutter team is in the process of landing this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make CameraPosition._toMap public (Maps plugin)
4 participants