HBox

Class
A primitive widget that can be used to apply a background and border.

Classes

Fields

alignment: Alignment
background: BackgroundStyle
border: Border
borderRadius: BorderRadius

Constructors

HBox(alignment: Nullable<Alignment>, background: BackgroundStyle, border: Nullable<Border>, borderRadius: Nullable<BorderRadius>, child: Widget, key: Key, constants: object[], modifiers: IReadOnlyCollection<Modifier>)
Creates a primitive widget that can be used to apply a background and border.

Parameters

alignment:Nullable<Alignment> - If a child widget is provided and doesn't flex, this controls how it is aligned within the HBox. The Alignment will be quantized to the nearest TextAnchor before being applied.
background:BackgroundStyle - The background applied to the box. If not provided, no background will be used.
border:Nullable<Border> - Defines the border of the box. Defaults to Border.None.
borderRadius:Nullable<BorderRadius> - Defines the border radius of the box. Defaults to BorderRadius.None.
child:Widget - The widget that is contained within the box.
key:Key - Passed on to Widget.key.
constants:object[] - Passed on to Widget.constants.
modifiers:IReadOnlyCollection<Modifier> - Passed on to Widget.modifiers.

Methods

CreateElement(): IWidgetElement
Creates a new IWidgetElement for the given widget configuration.
RemarksUsually, this will create an instance of an IWidgetElement and then call Widget.ReconcileInto to perform the initial reconciliation after that element gets attached to its parent and the panel.
DebugFillProperties(properties: DiagnosticPropertiesBuilder): void

Inherited Members

Extension Methods

ToDiagnosticsNodeSafeIfClipConstDisplayExpandFillFlexibleMarginOpacityPaddingPositionedShrinkSizeStretchTightStretchTightVisibilityWithModifierToBuildableToFactorySpreadDescribeIdentityShortHashToStringNullable

On this page