AddToCartButton constructor

const AddToCartButton({
  1. Key? key,
  2. Duration duration = const Duration(milliseconds: 3000),
  3. required Widget trolley,
  4. required Widget text,
  5. required Widget check,
  6. required dynamic onPressed(
    1. AddToCartButtonStateId id
    ),
  7. BorderRadius? borderRadius,
  8. Color? backgroundColor,
  9. double streetLineHeight = 2,
  10. double streetLineDashWidth = 12,
  11. double trolleyLeftMargin = 12,
  12. AddToCartButtonStateId stateId = AddToCartButtonStateId.idle,
})

Constructor Create an Add To Cart button.

Implementation

const AddToCartButton({
  Key? key,
  this.duration: const Duration(milliseconds: 3000),
  required this.trolley,
  required this.text,
  required this.check,
  required this.onPressed,
  this.borderRadius,
  this.backgroundColor,
  this.streetLineHeight: 2,
  this.streetLineDashWidth: 12,
  this.trolleyLeftMargin: 12,
  this.stateId = AddToCartButtonStateId.idle,
}) : super(key: key);