HGap

Class
A widget used to easily add spacing between other widgets.

Fields

axis: Nullable<Axis>
level: int
size: Nullable<StyleLength>

Constructors

HGap(level: int, axis: Nullable<Axis>, key: Key, constants: object[], modifiers: IReadOnlyCollection<Modifier>)
Creates a widget to add spacing between other widgets using a theme-defined size.

Parameters

level:int - The level of the gap [1, 9], defaulting to 1. Sizes are resolved using PrimitiveBaseTheme.Spacing.
axis:Nullable<Axis> - The axis of the gap. If not specified, the axis of the parent flex container will be used, or vertical if there is no parent flex container.
key:Key - Passed on to Widget.key.
constants:object[] - Passed on to Widget.constants.
modifiers:IReadOnlyCollection<Modifier> - Passed on to Widget.modifiers.
HGap(size: Nullable<StyleLength>, axis: Nullable<Axis>, key: Key, constants: object[], modifiers: IReadOnlyCollection<Modifier>)
Creates a widget to add spacing between other widgets using a custom size.

Parameters

size:Nullable<StyleLength> - The size of the gap. Falls back to PrimitiveSpacingScheme.Space1 resolved using PrimitiveBaseTheme.Spacing when null.
axis:Nullable<Axis> - The axis of the gap. If not specified, the axis of the parent flex container will be used, or vertical if there is no parent flex container.
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.

Inherited Members

Extension Methods

ToDiagnosticsNodeSafeIfClipConstDisplayExpandFillFlexibleMarginOpacityPaddingPositionedShrinkSizeStretchTightStretchTightVisibilityWithModifierToBuildableToFactoryDescribeIdentityShortHashToStringNullable

On this page