frosted method
Blur
frosted({
- double blur = 5,
- Color frostColor = Colors.white,
- AlignmentGeometry alignment = Alignment.center,
- double? height,
- double? width,
- double frostOpacity = 0.0,
- BorderRadius? borderRadius,
- EdgeInsetsGeometry padding = EdgeInsets.zero,
Implementation
Blur frosted({
double blur = 5,
Color frostColor = Colors.white,
AlignmentGeometry alignment = Alignment.center,
double? height,
double? width,
double frostOpacity = 0.0,
BorderRadius? borderRadius,
EdgeInsetsGeometry padding = EdgeInsets.zero,
}) {
return Blur(
blur: blur,
blurColor: frostColor,
borderRadius: borderRadius,
child: Container(
height: height,
width: width,
padding: padding,
child: height == null || width == null ? this : const SizedBox.shrink(),
color: frostColor.setAlpha(frostOpacity),
),
alignment: alignment,
overlay: Padding(
padding: padding,
child: this,
),
);
}