Composite

An empty widget that can contain other widgets.

Import this type with “”

Parameters:

Adds the given widgets to the composite.

append(widgets)

Parameters:

  • widgets: Widget[]
    Returns:this

Adds all widgets in the given array to the composite.

Parameters:

  • widgets:
    Returns:this

padding

|Type: BoxDimensions|number, default: 0

Additional space to add inside the widget’s bounds. If set to a number, this padding will be applied on all four sides.

Fired when a child is added to this widget.

Event Parameters

  • child: Widget The widget that is added as a child.

  • index: number Denotes the position in the children list at which the child widget is added.

paddingChanged

Fired when the padding property has changed.

Event Parameters

  • value: BoxDimensions|number The new value of padding.

Fired when a child is removed from this widget.

Event Parameters

  • target: this The widget the event was fired on.

  • index: number The property index denotes the removed child widget’s position in the children list.`

原文: