clipRRect method

Widget clipRRect({
  1. Key? key,
  2. double? all,
  3. double? topLeft,
  4. double? topRight,
  5. double? bottomLeft,
  6. double? bottomRight,
  7. CustomClipper<RRect>? clipper,
  8. Clip clipBehavior = Clip.antiAlias,
  9. bool animate = false,
})

Implementation

Widget clipRRect({
  Key? key,
  double? all,
  double? topLeft,
  double? topRight,
  double? bottomLeft,
  double? bottomRight,
  CustomClipper<RRect>? clipper,
  Clip clipBehavior = Clip.antiAlias,
  bool animate = false,
}) =>
    animate
        ? _StyledAnimatedBuilder(
            key: key,
            builder: (animation) {
              return _AnimatedClipRRect(
                child: this,
                clipper: clipper,
                clipBehavior: clipBehavior,
                topLeft: topLeft ?? all ?? 0.0,
                topRight: topRight ?? all ?? 0.0,
                bottomLeft: bottomLeft ?? all ?? 0.0,
                bottomRight: bottomRight ?? all ?? 0.0,
                duration: animation.duration,
                curve: animation.curve,
              );
            },
          )
        : ClipRRect(
            key: key,
            child: this,
            clipper: clipper ?? null,
            clipBehavior: clipBehavior,
            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),
            ),
          );