Scaffold

Functions summary

Unit
@Composable
Scaffold(
    modifier: GlanceModifier,
    titleBar: (@Composable () -> Unit)?,
    backgroundColor: ColorProvider,
    horizontalPadding: Dp,
    content: @Composable () -> Unit
)

A simple slot api component for displaying widget UI with a TitleBar.

Functions

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

a modifier

titleBar: (@Composable () -> Unit)? = null

A composable that creates the TitleBar. Optional parameter.

backgroundColor: ColorProvider = GlanceTheme.colors.widgetBackground

the background color for the layout.

horizontalPadding: Dp = 12.dp

Scaffold provides a default padding which should work for most use cases. However, it can be overridden.

content: @Composable () -> Unit

The main content of the widget.