SingleViewChatTabItem

abstract class SingleViewChatTabItem(visible: Flow<Boolean>, scope: CoroutineScope) : NativeInputChatTabItem

Convenience NativeInputChatTabItem for the common case of a single, static view (e.g. a card).

Provide the view in onCreateView and a visible flow that drives whether the row is shown. The flow is the single knob: compose it from whatever state the item cares about — e.g. inputQuery.map { it.isEmpty() } for a zero-state card that hides while the user types, the item's own data for a state-driven card, both combined, or flowOf(true) to always show. hide is a sticky override (e.g. on dismiss) that wins over visible for the rest of the presentation.

Items that need multiple rows, view recycling across many items, or several sections should implement NativeInputChatTabItem directly.

Constructors

Link copied to clipboard
constructor(visible: Flow<Boolean>, scope: CoroutineScope)

Properties

Link copied to clipboard

The adapters slotted into the host's ConcatAdapter, in order. Most items contribute a single adapter; returning several lets one item own multiple sections without nesting ConcatAdapters. The plugin fully owns each adapter's item count and view holders.

Functions

Link copied to clipboard
abstract fun onCreateView(parent: ViewGroup): View

Create the view shown as the single row. Called once; parent supplies the context.