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 = CupertinoColors.white,
  7. double width = 58.0,
  8. double height = 26.0,
  9. LiquidGlassSettings? settings,
  10. bool useOwnLayer = false,
  11. GlassQuality? quality,
  12. bool enableHaptics = true,
  13. FocusNode? focusNode,
  14. bool autofocus = false,
  15. String? semanticLabel,
})

Creates a glass switch.

Implementation

const GlassSwitch({
  required this.value,
  required this.onChanged,
  super.key,
  this.activeColor,
  this.inactiveColor,
  this.thumbColor = CupertinoColors.white,
  this.width = 58.0,
  this.height = 26.0,
  this.settings,
  this.useOwnLayer = false,
  this.quality,
  this.enableHaptics = true,
  this.focusNode,
  this.autofocus = false,
  this.semanticLabel,
});