GlassContainer constructor
const
GlassContainer({
- Key? key,
- Widget? child,
- double? width,
- double? height,
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? margin,
- AlignmentGeometry? alignment,
- GlassType type = GlassType.frosted,
- GlassShape shape = GlassShape.roundedRectangle,
- BorderRadius? borderRadius,
- double? radius,
- Color? backgroundColor,
- double backgroundOpacity = 0.2,
- double blurIntensity = 10.0,
- Border? border,
- Color? borderColor,
- double borderWidth = 1.0,
- double borderOpacity = 0.2,
- List<
BoxShadow> ? boxShadow, - bool addShadow = true,
- Color? shadowColor,
- double shadowBlurRadius = 20.0,
- double shadowSpreadRadius = 0.0,
- Offset shadowOffset = const Offset(0, 8),
- Gradient? gradient,
- double gradientOpacity = 0.1,
- Clip clipBehavior = Clip.antiAlias,
- Matrix4? transform,
- AlignmentGeometry? transformAlignment,
- VoidCallback? onTap,
- VoidCallback? onLongPress,
- VoidCallback? onDoubleTap,
Implementation
const GlassContainer({
super.key,
this.child,
this.width,
this.height,
this.padding,
this.margin,
this.alignment,
this.type = GlassType.frosted,
this.shape = GlassShape.roundedRectangle,
this.borderRadius,
this.radius,
this.backgroundColor,
this.backgroundOpacity = 0.2,
this.blurIntensity = 10.0,
this.border,
this.borderColor,
this.borderWidth = 1.0,
this.borderOpacity = 0.2,
this.boxShadow,
this.addShadow = true,
this.shadowColor,
this.shadowBlurRadius = 20.0,
this.shadowSpreadRadius = 0.0,
this.shadowOffset = const Offset(0, 8),
this.gradient,
this.gradientOpacity = 0.1,
this.clipBehavior = Clip.antiAlias,
this.transform,
this.transformAlignment,
this.onTap,
this.onLongPress,
this.onDoubleTap,
});