BasicCupertinoSwitch constructor

BasicCupertinoSwitch({
  1. Key? key,
  2. required bool value,
  3. Color? activeColor,
  4. Color? activeTrackColor,
  5. MaterialStateProperty<Color?>? trackColor,
  6. MaterialStateProperty<Color?>? thumbColor,
  7. ValueChanged<bool>? onChanged,
  8. ValueWaitChanged<bool>? onWaitChanged,
})

Implementation

BasicCupertinoSwitch({
  super.key,
  required super.value,
  Color? activeColor,
  Color? activeTrackColor,
  MaterialStateProperty<Color?>? trackColor,
  MaterialStateProperty<Color?>? thumbColor,
  super.onChanged,
  super.onWaitChanged,
}) : super(
          builder: (bool value, onChanged) => Switch.adaptive(
              trackColor: trackColor,
              thumbColor: thumbColor,
              activeTrackColor: activeTrackColor,
              activeColor: activeColor ?? GlobalConfig().currentColor,
              value: value,
              onChanged: onChanged));