rememberBasicTooltipState
Composable Function
Common
@Composable
@ExperimentalFoundationApi
fun rememberBasicTooltipState(
initialIsVisible: Boolean = false,
isPersistent: Boolean = true,
mutatorMutex: MutatorMutex = BasicTooltipDefaults.GlobalMutatorMutex,
): BasicTooltipState
Create and remember the default BasicTooltipState
.
Parameters
initialIsVisible | the initial value for the tooltip's visibility when drawn. |
isPersistent | Boolean that determines if the tooltip associated with this will be persistent or not. If isPersistent is true, then the tooltip will only be dismissed when the user clicks outside the bounds of the tooltip or if BasicTooltipState.dismiss is called. When isPersistent is false, the tooltip will dismiss after a short duration. Ideally, this should be set to true when there is actionable content being displayed within a tooltip. |
mutatorMutex | MutatorMutex used to ensure that for all of the tooltips associated with the mutator mutex, only one will be shown on the screen at any time. |