Skip to content

Fix redraw circle when radius changes#86

Open
enqvida wants to merge 1 commit intofluttercommunity:masterfrom
enqvida:fix-ios-circle-radius-update
Open

Fix redraw circle when radius changes#86
enqvida wants to merge 1 commit intofluttercommunity:masterfrom
enqvida:fix-ios-circle-radius-update

Conversation

@enqvida
Copy link
Copy Markdown

@enqvida enqvida commented Mar 27, 2026

Include circleRadius in FlutterCircle equality so radius-only updates trigger overlay replacement on iOS.

Root cause

The Dart layer already treats radius as part of circle
equality and emits circle updates when only the radius
changes.

On iOS, FlutterCircle == did not compare circleRadius,
and CircleController.changeCircles(...) only replaces
the overlay when the old and new circles are different.
That allows radius-only updates to be skipped.

Fix

Add circleRadius to the native iOS equality check for
FlutterCircle.

Reproduction

  1. Render an AppleMap with a circle.
  2. Keep the same circleId.
  3. Update only the circle radius.
  4. Observe that the camera may update, but the visible
    circle can stay stale.

Notes

I did not add a new automated test here because I did not
find an existing iOS overlay regression test setup for
this path.

Pre-launch Checklist

  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy].
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making if a test is possible.
  • All existing and new tests are passing.

Include circleRadius in FlutterCircle equality so radius-only updates trigger overlay replacement on iOS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant