style property
The SwitchStyle to be applied to the Switch widget
Implementation
@override
get style => DrivenSwitchStyle(
size: const Size(52, 32),
padding: const EdgeInsets.all(9),
trackBorderWidth: 0,
trackHeight: 32,
thumbSize: 26,
thumbElevation: 2,
trackColor: colorTheme.surfaceVariant,
thumbColor: isLight ? Colors.white : colorTheme.onSurfaceVariant,
selectedStyle: SwitchStyle(
thumbSize: 26,
trackColor: colorTheme.primary,
thumbColor: colorTheme.onPrimary,
),
hoveredStyle: const SwitchStyle(
overlayRadius: 20.0,
),
pressedStyle: const SwitchStyle(
overlayRadius: 10.0,
thumbSize: 26,
),
disabledStyle: const SwitchStyle(
trackAlpha: SwitchStyle.disabledTrackAlpha,
thumbAlpha: SwitchStyle.disabledThumbAlpha,
),
).merge(super.style);