padding function
Wraps a single child with padding.
Implementation
Node padding({
required Node child,
double? all,
double? horizontal,
double? vertical,
double? top,
double? right,
double? bottom,
double? left,
String? id,
String? classes,
}) {
final s = all != null
? Style(padding: all)
: Style(
paddingTop: top ?? vertical,
paddingRight: right ?? horizontal,
paddingBottom: bottom ?? vertical,
paddingLeft: left ?? horizontal,
);
return Node(
tag: 'div',
attrs: {'id': id, 'class': classes, 'style': _styleAttr(s)},
children: [child],
);
}