BreadcrumbBarContentProvider

abstract class BreadcrumbBarContentProvider<T>

Content provider for a breadcrumb bar.

Constructors

Link copied to clipboard
fun BreadcrumbBarContentProvider()

Functions

Link copied to clipboard
abstract fun getDisplayText(item: T?): String

Returns the display text for the item, or for the root is null is passed.

Link copied to clipboard
open fun getIcon(item: T?): Painter?

Returns the icon for the item, or for the root is null is passed.

Link copied to clipboard
open suspend fun getLeafContent(leaf: T): InputStream?

Returns the input stream with the leaf content. Some implementations may return null if this is not applicable.

Link copied to clipboard
abstract suspend fun getLeaves(item: T): List<T>

Returns the leaf elements that correspond to the specified item. If the specified item has no leaf elements, empty list should be returned.

Link copied to clipboard
abstract suspend fun getPathChoices(item: T?): List<T>

Returns the choice elements that correspond to the specified path. If the item is null, the list of root elements should be returned.

Extensions

Link copied to clipboard
suspend fun <T> BreadcrumbBarContentProvider<T>.getPathCommand(scope: CoroutineScope, commands: SnapshotStateList<Command>, item: T?, onItemSelected: (T) -> Unit, level: Int): Command