GlassButton constructor
const
GlassButton({
- required IconData? icon,
- required VoidCallback onTap,
- Key? key,
- String label = '',
- double width = 56,
- double height = 56,
- double iconSize = 24.0,
- Color iconColor = Colors.white,
- LiquidShape shape = const LiquidOval(),
- LiquidGlassSettings? settings,
- bool useOwnLayer = false,
- GlassQuality quality = GlassQuality.standard,
- double interactionScale = 1.05,
- double stretch = 0.5,
- double resistance = 0.08,
- HitTestBehavior stretchHitTestBehavior = HitTestBehavior.opaque,
- Color glowColor = Colors.white24,
- double glowRadius = 1.0,
- HitTestBehavior glowHitTestBehavior = HitTestBehavior.opaque,
- bool enabled = true,
- GlassButtonStyle style = GlassButtonStyle.filled,
Creates a glass button with an icon.
Implementation
const GlassButton({
required this.icon,
required this.onTap,
super.key,
this.label = '',
this.width = 56,
this.height = 56,
this.iconSize = 24.0,
this.iconColor = Colors.white,
this.shape = const LiquidOval(),
this.settings,
this.useOwnLayer = false,
this.quality = GlassQuality.standard,
// LiquidStretch properties
this.interactionScale = 1.05,
this.stretch = 0.5,
this.resistance = 0.08,
this.stretchHitTestBehavior = HitTestBehavior.opaque,
// GlassGlow properties
this.glowColor = Colors.white24,
this.glowRadius = 1.0,
this.glowHitTestBehavior = HitTestBehavior.opaque,
this.enabled = true,
this.style = GlassButtonStyle.filled,
}) : child = null;