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. List<BoxShadow>? thumbShadow,
  8. double width = 58.0,
  9. double height = 26.0,
  10. LiquidGlassSettings? settings,
  11. bool useOwnLayer = false,
  12. GlassQuality? quality,
  13. bool enableHaptics = true,
  14. FocusNode? focusNode,
  15. bool autofocus = false,
  16. String? semanticLabel,
  17. Color? onLabelColor,
  18. Color? offLabelColor,
})

Creates a glass switch.

Implementation

const GlassSwitch({
  required this.value,
  required this.onChanged,
  super.key,
  this.activeColor,
  this.inactiveColor,
  this.thumbColor = CupertinoColors.white,
  this.thumbShadow,
  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,
  this.onLabelColor,
  this.offLabelColor,
});