MaterialTheme

interface MaterialTheme<T : Modifier> : Layout<T>

Material Design 主题.

Material 主题化是指对您的 Material Design 应用进行自定义,以更好地反映您产品的品牌。 此组件用于配置其内部所有 Material 组件(如 Button、Checkbox 等)的整体外观和感觉。

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 setColorScheme(colorSchemeBuilder: ColorScheme.() -> Unit)

通过构建器设置此主题层次结构的完整 Material 颜色主题定义。

Link copied to clipboard
abstract fun setContent(slotBuilder: UnitScopeSlot.() -> Unit)

设置此 MaterialTheme 包裹的内容。

Link copied to clipboard
abstract fun setModifier(modifierBuilder: T.() -> Unit)
Link copied to clipboard
abstract fun setShapes(shapesBuilder: Shapes.() -> Unit)

通过构建器设置将用作此主题层次结构形状系统的一组圆角形状。

Link copied to clipboard
abstract fun setTypography(typographyBuilder: Typography.() -> Unit)

通过构建器设置将用作此主题层次结构排版系统的一组文本样式。

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 会重组