Skip to content

Add CameraUpdate.newLatLngBoundsWithEdgeInsets (#183439)#11438

Open
benji-farquhar wants to merge 3 commits intoflutter:mainfrom
benji-farquhar:new-lat-lng-bounds-edge-insets
Open

Add CameraUpdate.newLatLngBoundsWithEdgeInsets (#183439)#11438
benji-farquhar wants to merge 3 commits intoflutter:mainfrom
benji-farquhar:new-lat-lng-bounds-edge-insets

Conversation

@benji-farquhar
Copy link
Copy Markdown

@benji-farquhar benji-farquhar commented Apr 5, 2026

Fixes #183439

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for CameraUpdate.newLatLngBoundsWithEdgeInsets across the Android, iOS, and Web implementations of the google_maps_flutter plugin. The changes include updating the platform interface, implementing the new camera update type in the platform-specific code, and adding relevant tests. A critical issue was identified in the Objective-C conversion logic where the isKindOfClass: check and type casting are incorrectly applied to the wrapper object instead of the wrapped camera update.

@benji-farquhar
Copy link
Copy Markdown
Author

benji-farquhar commented Apr 5, 2026

Code Review

This pull request adds support for CameraUpdate.newLatLngBoundsWithEdgeInsets across the Android, iOS, and Web implementations of the google_maps_flutter plugin. The changes include updating the platform interface, implementing the new camera update type in the platform-specific code, and adding relevant tests. A critical issue was identified in the Objective-C conversion logic where the isKindOfClass: check and type casting are incorrectly applied to the wrapper object instead of the wrapped camera update.

The issue pointed out by gemini-code-assist is a false positive. The local variable update is already cameraUpdate.cameraUpdate (the unwrapped inner object). The code checks [update isKindOfClass:] which is exactly the same pattern as every other case in the function.

@gemini-code-assist
Copy link
Copy Markdown

Thank you for the clarification, @benji-farquhar. I appreciate you pointing out that the update variable is already the unwrapped inner object. You are correct that the isKindOfClass: check is consistent with the existing patterns in FGMConversionUtils.m. I have noted this as a false positive.

@benji-farquhar benji-farquhar force-pushed the new-lat-lng-bounds-edge-insets branch 4 times, most recently from 782d0bf to ee0334f Compare April 6, 2026 21:39
@stuartmorgan-g stuartmorgan-g self-requested a review April 7, 2026 18:17
@benji-farquhar benji-farquhar force-pushed the new-lat-lng-bounds-edge-insets branch from ee0334f to 751bbd3 Compare April 8, 2026 08:30
@benji-farquhar benji-farquhar force-pushed the new-lat-lng-bounds-edge-insets branch from 751bbd3 to f23a0ad Compare April 8, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[google_maps_flutter] Support EdgeInsets in CameraUpdate.newLatLngBounds for asymmetric padding

1 participant