paddingDirectional method

Widget paddingDirectional({
  1. Key? key,
  2. double? all,
  3. double? horizontal,
  4. double? vertical,
  5. double? top,
  6. double? bottom,
  7. double? start,
  8. double? end,
  9. bool animate = false,
})

Implementation

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