GlassSwitch constructor
const
GlassSwitch({
- required bool value,
- required ValueChanged<
bool> ? onChanged, - Key? key,
- Color? activeColor,
- Color? inactiveColor,
- Color thumbColor = CupertinoColors.white,
- List<
BoxShadow> ? thumbShadow, - double width = 58.0,
- double height = 26.0,
- LiquidGlassSettings? settings,
- bool useOwnLayer = false,
- GlassQuality? quality,
- bool enableHaptics = true,
- FocusNode? focusNode,
- bool autofocus = false,
- String? semanticLabel,
- Color? onLabelColor,
- 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,
});