FrostedGlassEffect constructor

const FrostedGlassEffect({
  1. Key? key,
  2. required Widget child,
  3. Color color = Colors.black26,
  4. BorderRadius? radius,
  5. EdgeInsets? padding,
})

Creates a FrostedGlassEffect.

This widget wraps a child widget with a frosted glass effect, using a semi-transparent color overlay and optional padding and border radius.

Example:

FrostedGlassEffect(
  child: Text('Hello, World!'),
  color: Colors.black26,
  radius: BorderRadius.circular(10),
  padding: EdgeInsets.all(8),
)

Implementation

const FrostedGlassEffect({
  super.key,
  required this.child,
  this.color = Colors.black26,
  this.radius,
  this.padding,
});