onPressed property
onPressed : The users only are able to press on this button on AddToCartButtonStateId.idle state (then this will be turned to AddToCartButtonStateId.loading state), and on AddToCartButtonStateId.done state (then this will be turned to AddToCartButtonStateId.idle state).
Implementation
final Function(AddToCartButtonStateId id) onPressed;