borderRadiusDirectional method

Widget borderRadiusDirectional({
  1. Key? key,
  2. double? all,
  3. double? topStart,
  4. double? topEnd,
  5. double? bottomStart,
  6. double? bottomEnd,
  7. bool animate = false,
})

Implementation

Widget borderRadiusDirectional({
  Key? key,
  double? all,
  double? topStart,
  double? topEnd,
  double? bottomStart,
  double? bottomEnd,
  bool animate = false,
}) {
  BoxDecoration decoration = BoxDecoration(
    borderRadius: BorderRadiusDirectional.only(
      topStart: Radius.circular(topStart ?? all ?? 0.0),
      topEnd: Radius.circular(topEnd ?? all ?? 0.0),
      bottomStart: Radius.circular(bottomStart ?? all ?? 0.0),
      bottomEnd: Radius.circular(bottomEnd ?? all ?? 0.0),
    ),
  );
  return animate
      ? _StyledAnimatedBuilder(
          key: key,
          builder: (animation) {
            return _AnimatedDecorationBox(
              child: this,
              decoration: decoration,
              duration: animation.duration,
              curve: animation.curve,
            );
          },
        )
      : DecoratedBox(
          key: key,
          child: this,
          decoration: decoration,
        );
}