ExpandingAttributionButton

@Composable
fun ExpandingAttributionButton(    cameraState: CameraState,     styleState: StyleState,     modifier: Modifier = Modifier,     contentAlignment: Alignment = Alignment.BottomEnd,     toggleButton: @Composable (onClick: () -> Unit) -> Unit = AttributionButtonDefaults.button,     expandedContent: @Composable (List<String>) -> Unit = AttributionButtonDefaults.content,     expandedStyle: AttributionButtonStyle = AttributionButtonDefaults.expandedStyle(),     collapsedStyle: AttributionButtonStyle = AttributionButtonDefaults.collapsedStyle(),     expand: (Alignment) -> EnterTransition = AttributionButtonDefaults.expand,     collapse: (Alignment) -> ExitTransition = AttributionButtonDefaults.collapse)(source)

Info button from which an attribution popup text is expanded. This version retracts when the user interacts with the map.

Parameters

cameraState

Used to dismiss the attribution when the user interacts with the map.

styleState

Used to get the attribution links to display.

contentAlignment

Will be used to determine layout of the attribution icon and text.

toggleButton

Composable that defines the button used to toggle the attribution display. Takes an onClick function parameter that should be called to switch states.

expandedContent

Composable that defines how the attribution content is displayed when expanded. Takes a list of HTML strings as a parameter.

expandedStyle

Style of the attribution Surface when it is expanded

collapsedStyle

Style of the attribution Surface when it is collapsed

expand

Function that returns an EnterTransition for the expanding animation based on the given alignment

collapse

Function that returns an ExitTransition for the collapsing animation based on the given alignment


@Composable
fun ExpandingAttributionButton(    expanded: Boolean,     onClick: () -> Unit,     styleState: StyleState,     modifier: Modifier = Modifier,     contentAlignment: Alignment = Alignment.BottomEnd,     toggleButton: @Composable (onClick: () -> Unit) -> Unit = AttributionButtonDefaults.button,     expandedContent: @Composable (List<String>) -> Unit = AttributionButtonDefaults.content,     expandedStyle: AttributionButtonStyle = AttributionButtonDefaults.expandedStyle(),     collapsedStyle: AttributionButtonStyle = AttributionButtonDefaults.collapsedStyle(),     expand: (Alignment) -> EnterTransition = AttributionButtonDefaults.expand,     collapse: (Alignment) -> ExitTransition = AttributionButtonDefaults.collapse)(source)

Info button from which an attribution popup text is expanded. This version allows the caller to manage the state.

Parameters

expanded

Whether the attribution text is expanded.

onClick

Called when the button is pressed. Should toggle the expanded state.

styleState

Used to get the attribution links to display.

contentAlignment

Will be used to determine layout of the attribution icon and text.

toggleButton

Composable that defines the button used to toggle the attribution display. Takes an onClick function parameter that should be called to switch states.

expandedContent

Composable that defines how the attribution content is displayed when expanded. Takes a list of HTML strings as a parameter.

expandedStyle

Style of the attribution Surface when it is expanded

collapsedStyle

Style of the attribution Surface when it is collapsed

expand

Function that returns an EnterTransition for the expanding animation based on the given alignment

collapse

Function that returns an ExitTransition for the collapsing animation based on the given alignment