-
Notifications
You must be signed in to change notification settings - Fork 145
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
Trigger warning / error when non GoogleMapComposable is used inside of GoogleMap #344
Comments
Hi @DarrylBayliss ! Thanks for the issue. There are a few things in this issue to take into consideration.
TL;DR: we need to improve the documentation, and think about how to pass components to content(). As a start, I would like to add a few components (there is this issue which is interesting since we need to model exactly this problem: #340) |
Hi @kikoso, You raise good points about the documentation needing improvement too to help developers understand expected usage. I'd be interested in hearing more about your thoughts on the |
Hi @DarrylBayliss . Upon further analysis, it seems that the annotation used within GoogleMapComposable was updated at some point, but it should be now triggering a warning. See the following message: This is the output of running a build or assemble operation. Of course, it would be great to have it as a Lint rule instead. |
please add warning, I was trying to animate marker fade out with
it's even covered in https://www.composables.com/tutorials/animate-maps-compose |
Is your feature request related to a problem? Please describe.
It's too easy to use Composables not intended for rendering to the map inside the GoogleMap
content
lambda. If I pass in aColumn
for example, the only hint I get is a non specific crash in Logcat:Describe the solution you'd like
A warning or error triggered within the IDE, informing the developer of a possible misuse of a composable.
Describe alternatives you've considered
I'm conscious
GoogleMapComposable
is available to help with this. I am not sure it is working as extended. I see no warning when passing a nonGoogleMapComposable
into aGoogleMap
.Additional context
See #335 for an example of this situation.
The text was updated successfully, but these errors were encountered: