CustomCreditCardWidget constructor

const CustomCreditCardWidget({
  1. Key? key,
  2. required String cardNumber,
  3. required String expiryDate,
  4. required String cardHolderName,
  5. required String cvvCode,
  6. required bool showBackView,
  7. String? bankName,
  8. Duration animationDuration = const Duration(milliseconds: 500),
  9. double? height,
  10. double? width,
  11. TextStyle? textStyle,
  12. Color cardBgColor = const Color(0xff1b447b),
  13. bool obscureCardNumber = true,
  14. bool obscureCardCvv = true,
  15. String labelExpiredDate = 'MM/YY',
  16. String labelValidThru = 'VÁLIDA\nHASTA',
  17. CardType? cardType,
  18. bool isHolderNameVisible = false,
  19. String? backgroundImage,
  20. String? backgroundNetworkImage,
  21. Glassmorphism? glassmorphismConfig,
  22. bool isChipVisible = true,
  23. bool isSwipeGestureEnabled = true,
  24. List<CustomCardTypeIcon> customCardTypeIcons = const <CustomCardTypeIcon>[],
  25. required void onCreditCardWidgetChange(
    1. CreditCardBrand
    ),
  26. double padding = AppConstants.creditCardPadding,
  27. Color? chipColor,
  28. BoxBorder? frontCardBorder,
  29. double? chipSizedBoxHeight,
  30. TextStyle? validThruTextStyle,
  31. double? sizedBoxCardName,
  32. double? sizedBoxCardNumber,
  33. BoxBorder? backCardBorder,
  34. TextStyle? expiryDateTextStyle,
  35. TextStyle? cvvTextStyle,
  36. bool obscureInitialCardNumber = false,
})

A widget showcasing credit card UI.

Implementation

const CustomCreditCardWidget({
  Key? key,
  required this.cardNumber,
  required this.expiryDate,
  required this.cardHolderName,
  required this.cvvCode,
  required this.showBackView,
  this.bankName,
  this.animationDuration = const Duration(milliseconds: 500),
  this.height,
  this.width,
  this.textStyle,
  this.cardBgColor = const Color(0xff1b447b),
  this.obscureCardNumber = true,
  this.obscureCardCvv = true,
  this.labelExpiredDate = 'MM/YY',
  this.labelValidThru = 'VÁLIDA\nHASTA',
  this.cardType,
  this.isHolderNameVisible = false,
  this.backgroundImage,
  this.backgroundNetworkImage,
  this.glassmorphismConfig,
  this.isChipVisible = true,
  this.isSwipeGestureEnabled = true,
  this.customCardTypeIcons = const <CustomCardTypeIcon>[],
  required this.onCreditCardWidgetChange,
  this.padding = AppConstants.creditCardPadding,
  this.chipColor,
  this.frontCardBorder,
  this.chipSizedBoxHeight,
  this.validThruTextStyle,
  this.sizedBoxCardName,
  this.sizedBoxCardNumber,
  this.backCardBorder,
  this.expiryDateTextStyle,
  this.cvvTextStyle,
  this.obscureInitialCardNumber = false,
}) : super(key: key);