VisibilityState

interface VisibilityState

Interface defining the contract for managing visibility state and behavior.

Provides methods to control the visibility state:

  • show: Sets the visibility to true.

  • hide: Sets the visibility to false.

  • toggle: Toggles the current visibility state.

  • isVisible: Indicates whether the controlled entity is currently visible.

Types

Link copied to clipboard

Factory interface for creating instances of VisibilityState.

Properties

Link copied to clipboard
abstract val isVisible: Boolean

Indicates whether the controlled entity is currently visible.

Link copied to clipboard
abstract val scope: CoroutineScope

The CoroutineScope associated with this visibility state, used for launching coroutines.

Functions

Link copied to clipboard
abstract fun hide()

Hides the controlled entity, setting its visibility to false.

Link copied to clipboard
abstract fun show()

Shows the controlled entity, setting its visibility to true.

Link copied to clipboard
abstract fun toggle()

Toggles the visibility state of the controlled entity. If currently visible, hides it; if hidden, shows it.