Glass constructor

const Glass({
  1. Key? key,
  2. bool ignoreContextSignals = false,
  3. Color? disabledColor,
  4. Widget? under,
  5. Color? tint,
  6. bool disabled = false,
  7. BorderRadius borderRadius = const BorderRadius.all(Radius.circular(0)),
  8. required Widget child,
})

Creates a Glass widget.

The child parameter is required and specifies the widget to apply the glass effect to. Other parameters customize the appearance of the glass effect.

Example:

Glass(
  borderRadius: BorderRadius.circular(12),
  tint: Colors.blue.withOpacity(0.1),
  child: Padding(
    padding: EdgeInsets.all(16),
    child: Text("This text is behind glass"),
  ),
)

Implementation

const Glass(
    {super.key,
    this.ignoreContextSignals = false,
    this.disabledColor,
    this.under,
    this.tint,
    this.disabled = false,
    this.borderRadius = const BorderRadius.all(Radius.circular(0)),
    required this.child});