SimpleIviThemeComponentSelector

A simple IviThemeComponentSelector which can be used if the component selector should only add or overwrite the preceding selection of IviThemeComponents with one or more IviThemeComponents.

This IviThemeComponentSelector implementation cannot be used if the selection depends on the selection of the preceding selector or to remove selected IviThemeComponent from selection of the preceding selector.

See also toComponentSelector.

Parameters

componentSelectionFlowFactory

Invoked to create a flow of IviThemeComponentSelectorSelection values. Each emitted value is added to the selection of the preceding selector. If an IviThemeCategory is present in both selections, the selected IviThemeComponent from the emitted value takes precedence. The flow must emit at least one value. The value may be an empty IviThemeComponentSelectorSelection. Delaying the initial emitted value, delays the application startup. The factory method is provided with the IviThemeComponentSelectorContext. The context can be used to determine the IviThemeComponentSelectorContext.availableComponents and to access the rest of the system.

Constructors

Link copied to clipboard
constructor(componentSelectionFlow: Flow<IviThemeComponentSelectorSelection>)

Constructs a SimpleIviThemeComponentSelector with a flow of IviThemeComponentSelectorSelection values. The flow must emit at least one value. This may be an empty IviThemeComponentSelectorSelection. Delaying the initial emitted value, delays the application startup.

constructor(componentSelectionFlowFactory: (IviThemeComponentSelectorContext) -> Flow<IviThemeComponentSelectorSelection>)

Inherited properties

Link copied to clipboard

Inherited functions

Link copied to clipboard
open override fun toString(): String