-
Notifications
You must be signed in to change notification settings - Fork 129
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
rememberCameraPositionState() should accept inputs
parameter
#198
Comments
The same applies to |
I think the idea, at least in the case of
I expect it will change at some point to make it less edgy: #149 |
Good point. In case of val pos = remember(latitude, longitude) { LatLng(latitude, longitude) }
val cameraPositionState = rememberSaveable(pos, saver = CameraPositionState.Saver) {
CameraPositionState(
position = CameraPosition.fromLatLngZoom(pos, 17f),
)
} which works as expected but applying the same pattern to |
So you should be able to do:
Same comment for |
The functions have a
I'm talking about
|
inputs
parameter
Gotcha—yes I misunderstood your question. I don't see any reasons for |
I can create a PR for |
Adding |
I just ran into the same issue, and it took me about three hours of debugging to realize that
Providing a 1:1 match with |
I noticed that in version 2.7.0 of
maps-compose
the function rememberCameraPositionState does not accept aninputs
parameter although it just delegates torememberSaveable
, which hasvararg inputs: Any?
. Is this a deliberate design decision?I have a situation where the value actually should be recreated because latitude and longitude change after the user has selected a different location.
I'm happy to provide a pull request if this is a desired change.
The text was updated successfully, but these errors were encountered: