padding method
Implementation
Widget padding({
Key? key,
double? all,
double? horizontal,
double? vertical,
double? top,
double? bottom,
double? left,
double? right,
bool animate = false,
}) =>
animate
? Builder(
key: key,
builder: (BuildContext context) {
_StyledAnimatedModel animation = this._getAnimation(context);
return AnimatedPadding(
child: this,
padding: EdgeInsets.only(
top: top ?? vertical ?? all ?? 0.0,
bottom: bottom ?? vertical ?? all ?? 0.0,
left: left ?? horizontal ?? all ?? 0.0,
right: right ?? horizontal ?? all ?? 0.0,
),
duration: animation.duration,
curve: animation.curve,
);
},
)
: Padding(
key: key,
padding: EdgeInsets.only(
top: top ?? vertical ?? all ?? 0.0,
bottom: bottom ?? vertical ?? all ?? 0.0,
left: left ?? horizontal ?? all ?? 0.0,
right: right ?? horizontal ?? all ?? 0.0,
),
child: this,
);