CreditCardWidget constructor
const
CreditCardWidget({
- Key? key,
- required String cardNumber,
- required String expiryDate,
- required String cardHolderName,
- required String cvvCode,
- required bool showBackView,
- String? bankName,
- Duration animationDuration = const Duration(milliseconds: 500),
- double? height,
- double? width,
- TextStyle? textStyle,
- Color cardBgColor = const Color(0xff1b447b),
- bool obscureCardNumber = true,
- bool obscureCardCvv = true,
- String labelCardHolder = 'CARD HOLDER',
- String labelExpiredDate = 'MM/YY',
- String labelValidThru = 'VALID\nTHRU',
- CardType? cardType,
- bool isHolderNameVisible = false,
- String? backgroundImage,
- String? backgroundNetworkImage,
- Glassmorphism? glassmorphismConfig,
- bool isChipVisible = true,
- bool isSwipeGestureEnabled = true,
- List<
CustomCardTypeIcon> customCardTypeIcons = const <CustomCardTypeIcon>[], - required void onCreditCardWidgetChange(),
- double padding = AppConstants.creditCardPadding,
- Color? chipColor,
- BoxBorder? frontCardBorder,
- BoxBorder? backCardBorder,
- bool obscureInitialCardNumber = false,
A widget showcasing credit card UI.
Implementation
const CreditCardWidget({
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.labelCardHolder = 'CARD HOLDER',
this.labelExpiredDate = 'MM/YY',
this.labelValidThru = 'VALID\nTHRU',
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.backCardBorder,
this.obscureInitialCardNumber = false,
}) : super(key: key);