BasicSwitch constructor

BasicSwitch({
  1. Key? key,
  2. required bool value,
  3. Color? activeColor,
  4. Color? trackColor,
  5. Color thumbColor = Colors.white,
  6. ValueChanged<bool>? onChanged,
  7. ValueWaitChanged<bool>? onWaitChanged,
})

Implementation

BasicSwitch({
  super.key,
  required super.value,
  Color? activeColor,
  Color? trackColor,
  Color thumbColor = Colors.white,
  super.onChanged,
  super.onWaitChanged,
}) : super(
          builder: (bool value, onChanged) => XSwitch(
              activeColor: activeColor ?? GlobalConfig().currentColor,
              trackColor: trackColor,
              thumbColor: thumbColor,
              value: value,
              onChanged: onChanged));