Skip to content

Commit

Permalink
Added caption to card holder name and expiry date. SimformSolutionsPv…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefferson Mello Olynyki committed Apr 27, 2020
1 parent 2bb8484 commit a2882f2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/credit_card_widget.dart
Expand Up @@ -15,13 +15,17 @@ class CreditCardWidget extends StatefulWidget {
this.width,
this.textStyle,
this.cardBgColor = const Color(0xff1b447b),
this.expiryDateCaption = 'MM/YY',
this.cardHolderNameCaption = 'CARD HOLDER'
}) : assert(cardNumber != null),
assert(showBackView != null),
super(key: key);

final String cardNumber;
final String expiryDate;
final String expiryDateCaption;
final String cardHolderName;
final String cardHolderNameCaption;
final String cvvCode;
final TextStyle textStyle;
final Color cardBgColor;
Expand Down Expand Up @@ -291,7 +295,7 @@ class _CreditCardWidgetState extends State<CreditCardWidget>
padding: const EdgeInsets.only(left: 16),
child: Text(
widget.expiryDate.isEmpty || widget.expiryDate == null
? 'MM/YY'
? widget.expiryDateCaption
: widget.expiryDate,
style: widget.textStyle ?? defaultTextStyle,
),
Expand All @@ -302,7 +306,7 @@ class _CreditCardWidgetState extends State<CreditCardWidget>
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16),
child: Text(
widget.cardHolderName.isEmpty || widget.cardHolderName == null
? 'CARD HOLDER'
? widget.cardHolderNameCaption
: widget.cardHolderName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
Expand Down

0 comments on commit a2882f2

Please sign in to comment.