CartButton<VM extends num> constructor

const CartButton<VM extends num>({
  1. Key? key,
  2. VM? value,
  3. @Deprecated('use value instead') VM? count,
  4. VM? stepper,
  5. required ValueChanged<VM> onChanged,
  6. double size = 30.0,
  7. Axis axis = Axis.horizontal,
  8. double numberSize = 3,
  9. TextInputType? editKeyboardType,
  10. double? elevation,
  11. CartButtonStyle? style,
  12. Widget? defaultWidget,
  13. VoidCallback? onDefaultWidgetTapped,
})

Implementation

const CartButton({
  Key? key,
  VM? value,
  @Deprecated('use value instead') VM? count,
  VM? stepper,
  required this.onChanged,
  this.size = 30.0,
  this.axis = Axis.horizontal,
  this.numberSize = 3,
  this.editKeyboardType,
  this.elevation,
  this.style,
  this.defaultWidget,
  this.onDefaultWidgetTapped, // Add the onDefaultWidgetTapped callback
})  : _value = (value ?? count ?? 0) as VM,
      _stepper = (stepper ?? 1) as VM,
      super(key: key);