frosted method

Blur frosted({
  1. double blur = 5,
  2. Color frostColor = Colors.white,
  3. AlignmentGeometry alignment = Alignment.center,
  4. double? height,
  5. double? width,
  6. double frostOpacity = 0.0,
  7. BorderRadius? borderRadius,
  8. 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.withOpacity(frostOpacity),
    ),
    alignment: alignment,
    overlay: Padding(
      padding: padding,
      child: this,
    ),
  );
}