diff --git a/example/lib/main.dart b/example/lib/main.dart index 755bb55..81a613d 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -190,7 +190,8 @@ class MySampleState extends State { style: ElevatedButton.styleFrom( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8.0), - ), backgroundColor: const Color(0xff1b447b), + ), + backgroundColor: const Color(0xff1b447b), ), child: Container( margin: const EdgeInsets.all(12), diff --git a/lib/credit_card_form.dart b/lib/credit_card_form.dart index f9235f4..ee4a9d0 100644 --- a/lib/credit_card_form.dart +++ b/lib/credit_card_form.dart @@ -111,7 +111,7 @@ class _CreditCardFormState extends State { super.initState(); createCreditCardModel(); - + _cardNumberController.text = widget.cardNumber; _expiryDateController.text = widget.expiryDate; _cardHolderNameController.text = widget.cardHolderName; @@ -245,8 +245,11 @@ class _CreditCardFormState extends State { final List date = value.split(RegExp(r'/')); final int month = int.parse(date.first); final int year = int.parse('20${date.last}'); - final int lastDayOfMonth = month < 12 ? DateTime(year, month + 1, 0).day : DateTime(year + 1, 1, 0).day; - final DateTime cardDate = DateTime(year, month, lastDayOfMonth,23,59,59,999); + final int lastDayOfMonth = month < 12 + ? DateTime(year, month + 1, 0).day + : DateTime(year + 1, 1, 0).day; + final DateTime cardDate = DateTime( + year, month, lastDayOfMonth, 23, 59, 59, 999); if (cardDate.isBefore(now) || month > 12 ||