Icon

interface Icon<T : Modifier> : Widget<T>

Material Design 图标.

一个用于绘制 Material 图标的组件。此可组合项仅用于显示 Jetpack Compose 内置的 Material 图标。 如果需要加载本地/网络/资源中的图标,请考虑使用 AsyncImage

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard
abstract fun DisposableEffect(disposableEffectBuilder: DisposableEffect.() -> Unit)
Link copied to clipboard
Link copied to clipboard
abstract fun <V> getCompositionLocalValue(compositionLocal: ProvidableCompositionLocal<V>): V?

获取 compositionLocal 的值

Link copied to clipboard
abstract fun getContext(): ScriptContext

获取脚本上下文对象 ScriptContext.

Link copied to clipboard
abstract fun LaunchedEffect(launchedEffectBuilder: LaunchedEffect.() -> Unit)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun setContentDescription(desc: String?)

设置供无障碍服务使用的文本,用于描述此图标代表的内容。 除非此图标仅用于装饰目的,否则应始终提供此项。

Link copied to clipboard
abstract fun setModifier(modifierBuilder: T.() -> Unit)
Link copied to clipboard
abstract fun setTint(colorBuilder: Color.() -> Unit)

通过构建器设置应用于图标的着色。 如果希望不应用任何着色(例如用于多色图标),请在构建器中指定 Color.Unspecified

Link copied to clipboard
abstract fun setVector(type: String, name: String)

设置要在此图标内部绘制的 ImageVector。 您需要提供图标的类型(主题)和名称。

Link copied to clipboard
abstract fun setVisible(visible: Boolean)

设置显示/隐藏当前 Composable

Link copied to clipboard
abstract fun SideEffect(sideEffectBuilder: SideEffect.() -> Unit)
Link copied to clipboard

设置所有需要用到的聚合状态,例如 DrawerState, BottomSheetState 等

Link copied to clipboard
abstract fun trackSingleState(state: SingleState)

添加当前 Composable 需要监听的状态,如果状态改变的话 Composable 会重组