AppSwitch constructor
AppSwitch({
- Key? key,
- required bool isActive,
- required void onToggled(
- bool active
- SwitchAppearance? appearance,
Implementation
AppSwitch({
Key? key,
required this.isActive,
required this.onToggled,
this.appearance,
}) : assert(() {
if (appearance == null) return true;
return appearance.trackSize.width > appearance.trackSize.height;
}()),
super(key: key);