RoundRectBox function

DecoratedBox RoundRectBox({
  1. Widget? child,
  2. Color? color,
  3. BorderRadius? borderRadius,
  4. double radius = 8,
  5. BoxShadow? shadow,
})

Implementation

DecoratedBox RoundRectBox({Widget? child, Color? color, BorderRadius? borderRadius, double radius = 8, BoxShadow? shadow}) {
  return DecoratedBox(
      decoration: BoxDecoration(
        color: color,
        borderRadius: borderRadius ?? BorderRadius.all(Radius.circular(radius)),
        boxShadow: shadow == null ? null : [shadow],
      ),
      child: child);
}