Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[google_maps_flutter_android] Convert
PlatformCameraUpdate
to pigeon. #7507[google_maps_flutter_android] Convert
PlatformCameraUpdate
to pigeon. #7507Changes from all commits
e0762a1
e52567b
c59b6f4
8bfcb9b
68b1cdf
2b612b9
6b75ce6
a0f9bab
e54cc9d
d951404
497af2a
0c81c8c
312aeb4
ff1e466
69c361c
b2a664d
0ee9e29
cdecbae
e80cae6
f507163
e28d715
a798791
686b2d6
0fe823a
5fea8f4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may not be following the types here but is it possible to make this CameraUpdateFactory.newLatLng(latLngFromPigeon(newLatLng); It seems, based on names alone that we should not need so many unboxing/reboxing of lat long data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newLatLng
is an instance ofPlatformNewLatLng
, which represents the camera move update to the new position.latLngFromPigeon
accepts aPlatformLatLng
, which is just a boxed pair of numeric coordinates, not aPlatformNewLatLng
. I intend to add aCameraUpdate
prefix to the relevant classes, includingPlatformNewLatLng
, as per Stuart's comment, which I believe will make this more clear.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stuartmorgan is it a normal pattern to have "from" methods in pigeon conversion? As I am reading this pr I find that I very much do not care that the conversions are coming from pidgeon and instead care what the object is being converted into.
FWIW I think the answer is yes because i see a bunch of from methods but I did want to call out my confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe I established that naming convention in this file. The problem is that during this transition there have been a bunch of cases where there are two different version of all the methods: one that converts method channel primitives, for the unconverted code, and one that converts Pigeon objects, but both to the same object. E.g., the
toPoint
method that's finally able to be removed in this PR.In that context, the fact that the source object is Pigeon is very important. Especially because the old methods take
Object
which means you can accidentally pass a Pigeon object to them (which will then crash).I would have no objection to mass renaming these when the conversion is done and the old versions don't exist any more. Or we could mass rename the remaining old methods now to something that clearly identifies them, and then mass rename the Pigeon versions to use the generic names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense and makes me glad I asked the question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stuartmorgan Do you have any remaining concerns?