cardViewBlur static method
Implementation
static BoxDecoration cardViewBlur( {
required Color colorBackground,
required Color colorBlur,
required double radiusBoarderSize ,
required double radiusBlur,
BorderRadius? radiusBorder,
double widthShadow = 5 ,
BlurStyle blurStyle = BlurStyle.normal,
bool makeBlurColorDark = false
}) {
//radius
radiusBoarderSize ??= DSDimen.ds_size_corner_level_2;
var objRadius = Radius.circular( radiusBoarderSize );
var radiusDefault = BorderRadius.all( objRadius );
radiusBorder ??= radiusDefault;
List<BoxShadow> listShadow = [];
//shadow >> left bottom
var leftBottomShadow = BoxShadow(
color: colorBlur,
blurRadius: radiusBlur,
offset: Offset(widthShadow,widthShadow),
blurStyle: blurStyle,
spreadRadius: 0
);
listShadow.add(leftBottomShadow);
if( makeBlurColorDark) {
listShadow.add(leftBottomShadow);
listShadow.add(leftBottomShadow);
listShadow.add(leftBottomShadow);
listShadow.add(leftBottomShadow);
listShadow.add(leftBottomShadow);
listShadow.add(leftBottomShadow);
listShadow.add(leftBottomShadow);
listShadow.add(leftBottomShadow);
}
//box
var box = BoxDecoration(
boxShadow: listShadow,
borderRadius: radiusBorder ,
color: colorBackground
);
return box;
}