HWEdgeInsets

Padding values used by HWPadding and other layout widgets.

HWEdgeInsets

HWEdgeInsets describes padding around a widget. It mirrors Flutter's EdgeInsets API and only ships the constructors below.

Constructors

ConstructorDescription
HWEdgeInsets.all(double value)Same padding on all four sides.
HWEdgeInsets.symmetric({vertical, horizontal})Equal top/bottom and left/right padding. Both default to 0.0.
HWEdgeInsets.only({left, top, right, bottom})Per-side padding. Each side defaults to 0.0.

Fields

NameTypeDescription
topdoubleTop inset.
bottomdoubleBottom inset.
leftdoubleLeading inset.
rightdoubleTrailing inset.

Examples

HWPadding(
  padding: HWEdgeInsets.all(8.0),
  child: HWText.fixed('Hello World'),
)
HWPadding(
  padding: HWEdgeInsets.symmetric(horizontal: 12.0, vertical: 4.0),
  child: HWText.fixed('Hello World'),
)
HWPadding(
  padding: HWEdgeInsets.only(left: 16.0, top: 8.0),
  child: HWText.fixed('Hello World'),
)

Platform mapping