Scaffold

Composable Function

Android
@Composable
fun Scaffold(
    modifier: GlanceModifier = GlanceModifier,
    titleBar: @Composable (() -> Unit)? = null,
    backgroundColor: ColorProvider = GlanceTheme.colors.widgetBackground,
    horizontalPadding: Dp = 12.dp,
    content: @Composable () -> Unit,
)

A simple slot api component for displaying widget UI with a TitleBar. Sets the background color to GlanceTheme.colors.surface and applies padding. This is intended to be used as a top level component.

Parameters

modifiera modifier
titleBarA composable that creates the TitleBar. Optional parameter.
backgroundColorthe background color for the layout.
horizontalPaddingScaffold provides a default padding which should work for most use cases. However, it can be overridden.
contentThe main content of the widget.