StyleSchemaBuilderScope

Receiver of every tile builder's style = { } lambda. Accumulates size, spacing, background, border, clip and window-insets settings and compiles them into a StyleSchema via buildStyle. Every setter (size, margin, padding, background, border, clip, windowInsets) simply overwrites its own field — calling one twice keeps only the last value.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Registers builder as a child of this scope, snapshotting the CompositionLocal values currently active (via BuildContext.get) into GenericBuilder.compositionLocals — captured now, at DSL-call time, not later when build actually invokes it. Called once per nested DSL call (SimpleText(...), SendNetworkRequest(...), etc.) by each such call's own top-level builder function.

Link copied to clipboard
fun background(background: BackgroundSchema)

Sets the tile's background, built with solidColor or one of the gradient helpers (linearGradient, horizontalGradient, verticalGradient, radialGradient, sweepGradient).

fun background(color: ColorSchema, alpha: Float = 1.0f)

Sets a solid-color background — shorthand for background(solidColor(color, alpha)).

Link copied to clipboard
fun border(color: ColorSchema, thickness: Int, radius: RadiusSchema? = null)

Draws a border around the tile.

Link copied to clipboard

Builds every registered Builder in registration order, restoring each one's own GenericBuilder.compositionLocals snapshot (via BuildContext.with) for the duration of its own GenericBuilder.build call.

Link copied to clipboard

Compiles all the settings accumulated on this scope into a StyleSchema.

Link copied to clipboard

Fully circular/oval shape — the tile is clipped to an ellipse inscribed in its bounds.

Link copied to clipboard
fun clip(shape: ShapeSchema)

Clips the tile's content and background to shape, built with circleShape, rectangleShape or roundedCornerShape.

Link copied to clipboard

Fills the available width, optionally capped at max dp.

Link copied to clipboard

Fills fraction (0f–1f) of the tallest sibling's height, inside a Row/FlowRow.

Link copied to clipboard

Fills the available height, optionally capped at max dp.

Link copied to clipboard

Fixes the width to exactly value dp.

Link copied to clipboard

Fixes the height to exactly value dp.

Link copied to clipboard

Cross-axis self-alignment inherited from the container's alignItems.

Link copied to clipboard

Aligns this child by its text baseline, overriding the container's alignItems.

Link copied to clipboard

Aligns this child to the center of the cross axis, overriding the container's alignItems.

Link copied to clipboard

Aligns this child to the end of the cross axis, overriding the container's alignItems.

Link copied to clipboard

Aligns this child to the start of the cross axis, overriding the container's alignItems.

Link copied to clipboard

Stretches this child across the cross axis, overriding the container's alignItems.

Link copied to clipboard

Flex basis derived automatically from the child's own content size.

Link copied to clipboard

Flex basis fixed to value dp before growing/shrinking is applied.

Link copied to clipboard

Flex basis as a fraction (0f–1f) of the container's main-axis size.

Link copied to clipboard

CSS-flexbox-style horizontal sizing, for children of a FlexBox.

Link copied to clipboard
fun margin(horizontal: Int = 0, vertical: Int = 0)

Sets external spacing (outside the tile's border), symmetric on each axis, in dp.

fun margin(horizontal: Int = 0, top: Int = 0, bottom: Int = 0)

Sets external spacing (outside the tile's border), symmetric horizontally but independent top/bottom, in dp.

fun margin(top: Int = 0, end: Int = 0, bottom: Int = 0, start: Int = 0)

Sets external spacing (outside the tile's border) independently per edge, in dp.

Link copied to clipboard
fun padding(horizontal: Int = 0, vertical: Int = 0)

Sets internal spacing (inside the tile's border, around its content), symmetric on each axis, in dp.

fun padding(horizontal: Int = 0, top: Int = 0, bottom: Int = 0)

Sets internal spacing (inside the tile's border, around its content), symmetric horizontally but independent top/bottom, in dp.

fun padding(top: Int = 0, end: Int = 0, bottom: Int = 0, start: Int = 0)

Sets internal spacing (inside the tile's border, around its content) independently per edge, in dp.

Link copied to clipboard
fun radius(topStart: Int = 0, topEnd: Int = 0, bottomStart: Int = 0, bottomEnd: Int = 0): RadiusSchema

Corner radius, in dp, individually per corner — the value fed into roundedCornerShape and border.

Link copied to clipboard

Plain rectangular shape — no corner rounding, no clipping applied.

Link copied to clipboard

Rounded-rectangle shape with a fully custom radius per corner.

Rounded-rectangle shape with the same radius, in dp, applied to all four corners.

fun roundedCornerShape(topStart: Int, topEnd: Int, bottomStart: Int, bottomEnd: Int): ShapeSchema.RoundedCornerRectangle

Rounded-rectangle shape with an independent radius per corner, in dp.

Link copied to clipboard
fun size(width: SizeSchema.Behavior.Horizontal = fillHorizontally(), height: SizeSchema.Behavior.Vertical = wrapVertically())

Sets the tile's width/height behavior.

Link copied to clipboard

Spans value tracks horizontally, inside a Grid.

Link copied to clipboard

Spans value tracks vertically, inside a Grid.

Link copied to clipboard

Shares the parent's remaining width proportionally to value, inside a Row/FlowRow.

Link copied to clipboard

Shares the parent's remaining height proportionally to value, inside a Column.

Link copied to clipboard
Link copied to clipboard

Insets for the app's caption bar (desktop/large-screen window chrome).

Link copied to clipboard

Insets for a display cutout (e.g. camera notch).

Link copied to clipboard

Insets for the on-screen keyboard (IME), growing as it appears.

Link copied to clipboard

Insets for the navigation bar only.

Link copied to clipboard

Insets for the status bar only.

Link copied to clipboard

Insets for the status bar, navigation bar and cutouts combined.

Link copied to clipboard

Insets for a waterfall (curved-edge) display.

Link copied to clipboard

Shrinks the width to wrap its content.

Link copied to clipboard

Shrinks the height to wrap its content.