LGButton constructor
const
LGButton({
- 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,
- LGQuality quality = LGQuality.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,
- LGButtonStyle style = LGButtonStyle.filled,
Creates a glass button with an icon.
Implementation
const LGButton({
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 = LGQuality.standard,
this.interactionScale = 1.05,
this.stretch = 0.5,
this.resistance = 0.08,
this.stretchHitTestBehavior = HitTestBehavior.opaque,
this.glowColor = Colors.white24,
this.glowRadius = 1.0,
this.glowHitTestBehavior = HitTestBehavior.opaque,
this.enabled = true,
this.style = LGButtonStyle.filled,
}) : child = null;