GlassSwitch constructor

const GlassSwitch({
  1. required bool value,
  2. required ValueChanged<bool> onChanged,
  3. Key? key,
  4. Color? activeColor,
  5. Color? inactiveColor,
  6. Color thumbColor = Colors.white,
  7. double width = 58.0,
  8. double height = 26.0,
  9. LiquidGlassSettings? settings,
  10. bool useOwnLayer = false,
  11. GlassQuality quality = GlassQuality.standard,
})

Creates a glass switch.

Implementation

const GlassSwitch({
  required this.value,
  required this.onChanged,
  super.key,
  this.activeColor,
  this.inactiveColor,
  this.thumbColor = Colors.white,
  this.width = 58.0,
  this.height = 26.0,
  this.settings,
  this.useOwnLayer = false,
  this.quality = GlassQuality.standard,
});