Skip to content

Commit

Permalink
feat: change GoogleMap() content parameter default to {} and make con…
Browse files Browse the repository at this point in the history
…tent non-nullable (#521)

Fixes #493

BREAKING CHANGE: Adds optional contentDescriptor parameter to MarkerComposable and AdvancedMarker.  Makes content parameter of GoogleMap non-nullable, but with an empty default value.
  • Loading branch information
bubenheimer committed May 7, 2024
1 parent 9886813 commit 8e5e3a6
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -89,7 +89,7 @@ public fun GoogleMap(
onMyLocationClick: ((Location) -> Unit)? = null,
onPOIClick: ((PointOfInterest) -> Unit)? = null,
contentPadding: PaddingValues = NoPadding,
content: (@Composable @GoogleMapComposable () -> Unit)? = null,
content: @Composable @GoogleMapComposable () -> Unit = {},
) {
// When in preview, early return a Box with the received modifier preserving layout
if (LocalInspectionMode.current) {
Expand Down Expand Up @@ -140,9 +140,8 @@ public fun GoogleMap(

CompositionLocalProvider(
LocalCameraPositionState provides currentCameraPositionState,
) {
currentContent?.invoke()
}
currentContent
)
}
}
}
Expand Down

0 comments on commit 8e5e3a6

Please sign in to comment.