withRoundCorners method

Container withRoundCorners({
  1. required Color backgroundColor,
})

Add round corners to a Container if the Container already has a color use backgroundColor instead and remove the Color from the Container it self

Implementation

Container withRoundCorners({required Color backgroundColor}) => Container(
      decoration: BoxDecoration(
        color: backgroundColor,
        borderRadius: BorderRadius.all(
          Radius.circular(25),
        ),
      ),
      child: this,
    );