applyPadding method
Implementation
Widget applyPadding(Widget widget) {
if (_padding != null ||
_margin != null ||
_height != null ||
_width != null ||
_backgroundColor != null ||
_borderRadius != null) {
return Container(
padding: _padding,
margin: _margin,
height: _height,
width: _width,
decoration: _borderRadius == null && _backgroundColor == null
? null
: BoxDecoration(color: _backgroundColor, borderRadius: _borderRadius),
child: _borderRadius == null
? widget
: ClipRRect(
borderRadius: _borderRadius!,
child: widget,
),
);
} else {
return widget;
}
}