pad method
Apply padding
Implementation
Widget pad({
double all = 0,
double horizontal = 0,
double vertical = 0,
double left = 0,
double right = 0,
double top = 0,
double bottom = 0,
}) {
return Padding(
padding: EdgeInsets.only(
left: left != 0 ? left : (horizontal != 0 ? horizontal : all),
right: right != 0 ? right : (horizontal != 0 ? horizontal : all),
top: top != 0 ? top : (vertical != 0 ? vertical : all),
bottom: bottom != 0 ? bottom : (vertical != 0 ? vertical : all),
),
child: this,
);
}