KhaltiButton constructor

const KhaltiButton({
  1. Key? key,
  2. required PaymentConfig config,
  3. required ValueChanged<PaymentSuccessModel> onSuccess,
  4. required ValueChanged<PaymentFailureModel> onFailure,
  5. VoidCallback? onCancel,
  6. List<PaymentPreference> preferences = PaymentPreference.values,
  7. String? label,
  8. ButtonStyle? style,
})

Creates KhaltiButton with the provided properties.

Implementation

const KhaltiButton({
  Key? key,
  required this.config,
  required this.onSuccess,
  required this.onFailure,
  this.onCancel,
  this.preferences = PaymentPreference.values,
  this.label,
  ButtonStyle? style,
})  : _style = style,
      super(key: key);