PaddingWrapper.symmetric constructor
PaddingWrapper.symmetric({})
Factory constructor for symmetric padding (vertical and horizontal).
The vertical
and horizontal
parameters specify the padding for vertical
and horizontal sides, respectively.
Example usage:
PaddingWrapper.symmetric(
vertical: 10.0,
horizontal: 20.0,
child: Text('Symmetrically Padded Text'),
);
Implementation
factory PaddingWrapper.symmetric({
required Widget child,
double vertical = 16.0,
double horizontal = 16.0,
}) {
return PaddingWrapper(
padding: EdgeInsets.symmetric(vertical: vertical, horizontal: horizontal),
child: child,
);
}