[google_maps_flutter] Fix custom marker icons on iOS #10993
Merged
+40
−3
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.
In #10863 I intermediated asset loading through an asset loader, so that individual controllers weren't using the plugin registrar directly. In doing that, I just updated the types of the ivars, but—incorrectly—not their memory models.
Registrar references are generally
weakto avoid possible cycles (the registrar may internally be the same thing in the engine that owns the plugin instance), so the result was a weak reference to the new wrapper object. However, unlike the registrar, which has an externally enforced lifetime longer than the plugin, the wrapper was just an object created locally during map controller initialization, so was invalidated almost as soon as it was passed in. This fixes the controllers to keep strong references to the wrapper (which doesn't own anything, and has a weak registrar pointer, so can't create any cycles).Fixes flutter/flutter#182149
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3