borderRadius method

Widget borderRadius({
  1. Key? key,
  2. double? all,
  3. double? topLeft,
  4. double? topRight,
  5. double? bottomLeft,
  6. double? bottomRight,
  7. bool animate = false,
})

Implementation

Widget borderRadius({
  Key? key,
  double? all,
  double? topLeft,
  double? topRight,
  double? bottomLeft,
  double? bottomRight,
  bool animate = false,
}) {
  BoxDecoration decoration = BoxDecoration(
    borderRadius: BorderRadius.only(
      topLeft: Radius.circular(topLeft ?? all ?? 0.0),
      topRight: Radius.circular(topRight ?? all ?? 0.0),
      bottomLeft: Radius.circular(bottomLeft ?? all ?? 0.0),
      bottomRight: Radius.circular(bottomRight ?? 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,
        );
}