Skip to content

Commit

Permalink
Code is formatted.
Browse files Browse the repository at this point in the history
  • Loading branch information
ocakliemre committed Sep 9, 2022
1 parent 39e92ec commit 24ca037
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ class MySampleState extends State<MySample> {
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),
Expand Down
9 changes: 6 additions & 3 deletions lib/credit_card_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class _CreditCardFormState extends State<CreditCardForm> {
super.initState();

createCreditCardModel();

_cardNumberController.text = widget.cardNumber;
_expiryDateController.text = widget.expiryDate;
_cardHolderNameController.text = widget.cardHolderName;
Expand Down Expand Up @@ -245,8 +245,11 @@ class _CreditCardFormState extends State<CreditCardForm> {
final List<String> 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 ||
Expand Down

0 comments on commit 24ca037

Please sign in to comment.