GlassContainer constructor

const GlassContainer({
  1. Key? key,
  2. Widget? child,
  3. double? width,
  4. double? height,
  5. EdgeInsetsGeometry? padding,
  6. EdgeInsetsGeometry? margin,
  7. AlignmentGeometry? alignment,
  8. GlassType type = GlassType.frosted,
  9. GlassShape shape = GlassShape.roundedRectangle,
  10. BorderRadius? borderRadius,
  11. double? radius,
  12. Color? backgroundColor,
  13. double backgroundOpacity = 0.2,
  14. double blurIntensity = 10.0,
  15. Border? border,
  16. Color? borderColor,
  17. double borderWidth = 1.0,
  18. double borderOpacity = 0.2,
  19. List<BoxShadow>? boxShadow,
  20. bool addShadow = true,
  21. Color? shadowColor,
  22. double shadowBlurRadius = 20.0,
  23. double shadowSpreadRadius = 0.0,
  24. Offset shadowOffset = const Offset(0, 8),
  25. Gradient? gradient,
  26. double gradientOpacity = 0.1,
  27. Clip clipBehavior = Clip.antiAlias,
  28. Matrix4? transform,
  29. AlignmentGeometry? transformAlignment,
  30. VoidCallback? onTap,
  31. VoidCallback? onLongPress,
  32. 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,
});