VirtualBackgroundUiState

data class VirtualBackgroundUiState(val currentBackground: VirtualBackgroundUi = VirtualBackgroundUi.None, val backgroundList: ImmutableList<VirtualBackgroundUi> = ImmutableList(emptyList()), val isDeviceOverHeating: Boolean = false) : UiState

Represents the UI state for the virtual background feature.

This data class is annotated with Immutable to inform the Compose compiler that its properties will not change after construction, allowing for potential recomposition optimizations.

It implements UiState, suggesting it's part of a state management pattern (e.g., MVI - Model-View-Intent) where UI states are explicitly defined.

Constructors

Link copied to clipboard
constructor(currentBackground: VirtualBackgroundUi = VirtualBackgroundUi.None, backgroundList: ImmutableList<VirtualBackgroundUi> = ImmutableList(emptyList()), isDeviceOverHeating: Boolean = false)

Properties

Link copied to clipboard

An immutable list of available virtual backgrounds that the user can choose from. Each item in the list is a VirtualBackgroundUi instance. Using ImmutableList ensures that the list itself cannot be modified after this state object is created, contributing to the immutability of the state. Defaults to an empty immutable list.

Link copied to clipboard

The currently selected or active virtual background. It's represented by an instance of VirtualBackgroundUi, which could define different types of backgrounds like None, Blur, or specific images. Defaults to VirtualBackgroundUi.None.

Link copied to clipboard

Flag indicating whether the device is currently experiencing overheating. This might be used to disable or alter the behavior of resource-intensive features like virtual backgrounds. Defaults to false.