Cowpay constructor

const Cowpay({
  1. Key? key,
  2. LocalizationCode localizationCode = LocalizationCode.en,
  3. required String description,
  4. required String merchantReferenceId,
  5. required String customerMerchantProfileId,
  6. required String customerEmail,
  7. required String customerMobile,
  8. required CowpayEnvironment activeEnvironment,
  9. required num amount,
  10. required String customerFirstName,
  11. required String customerLastName,
  12. required String merchantCode,
  13. required String merchantHashCode,
  14. required String merchantMobile,
  15. required bool isFeesOnCustomer,
  16. String? logoStringUrl,
  17. double? height,
  18. Color? buttonColor,
  19. Color? buttonTextColor,
  20. Color? mainColor,
  21. TextStyle? buttonTextStyle,
  22. TextStyle? textFieldStyle,
  23. InputDecoration? textFieldInputDecoration,
  24. required dynamic onSuccess(
    1. PaymentSuccessModel paymentSuccessModel
    ),
  25. required dynamic onError(
    1. CowpayErrorModel error
    ),
  26. required Function onClosedByUser,
})

Implementation

const Cowpay({
  Key? key,
  this.localizationCode = LocalizationCode.en,
  required this.description,
  required this.merchantReferenceId,
  required this.customerMerchantProfileId,
  required this.customerEmail,
  required this.customerMobile,
  required this.activeEnvironment,
  required this.amount,
  required this.customerFirstName,
  required this.customerLastName,
  required this.merchantCode,
  required this.merchantHashCode,
  required this.merchantMobile,
  required this.isFeesOnCustomer,
  this.logoStringUrl,
  this.height,
  this.buttonColor,
  this.buttonTextColor,
  this.mainColor,
  this.buttonTextStyle,
  this.textFieldStyle,
  this.textFieldInputDecoration,
  required this.onSuccess,
  required this.onError,
  required this.onClosedByUser,
}) : super(key: key);