import 'package:flutter/cupertino.dart'; class CustomSwitch extends StatefulWidget { final Color? activeclor; final bool? switchvalue; final ValueChanged? onchanged; const CustomSwitch( {super.key, this.activeclor, this.switchvalue, this.onchanged}); @override State createState() => _CustomSwitchState(); } class _CustomSwitchState extends State { @override Widget build(BuildContext context) { return CupertinoSwitch( activeColor: widget.activeclor, value: widget.switchvalue!, onChanged: widget.onchanged // (value) { // setState(() { // _switchValue = value; // }); // }, ); } }