Skip to content

Commit

Permalink
feat: Deprecate rememberMarkerState function.
Browse files Browse the repository at this point in the history
  • Loading branch information
smith.jspiner committed Dec 14, 2024
1 parent 356d429 commit 17f3857
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,18 @@ public class MarkerState private constructor(position: LatLng) {
* If you need this implementation, use 'rememberUpdatedMarkerState'.
*/
@Composable
@Deprecated(
message = "Use 'rememberUpdatedMarkerState' instead - It may be confusing to think " +
"that the state is automatically updated as the position changes, " +
"so it will be changed or removed.",
replaceWith = ReplaceWith(
expression = """
val markerState = rememberSaveable(key = key, saver = MarkerState.Saver) {
MarkerState(position)
}
"""
)
)
public fun rememberMarkerState(
key: String? = null,
position: LatLng = LatLng(0.0, 0.0)
Expand Down

0 comments on commit 17f3857

Please sign in to comment.