Skip to content

Commit

Permalink
🐛 Fix Theme Application
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya-css committed Sep 18, 2023
1 parent dcdcab2 commit 145df0b
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 235 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# [3.0.7](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/tree/3.0.7) (Unreleased)
# [3.0.8](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/tree/3.0.8) (Unreleased)

- Fixed [#136](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/issues/136)
Application theme not applied to `CreditCardForm`. Removed `themeColor`, `textColor`,
`cursorColor` from `CreditCardForm`.

# [3.0.7](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/tree/3.0.7)

- Enhancement [#133](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/pull/133) Add valid thru label customization.
- Enhancement [#142](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/issues/142) Adding RuPay as card-type for users centric to India
Expand Down
43 changes: 20 additions & 23 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,22 @@ class MySampleState extends State<MySample> {
title: 'Flutter Credit Card View Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
textTheme: const TextTheme(
// Text style for text fields' input.
titleMedium: TextStyle(color: Colors.white, fontSize: 18),
),
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.white,
// Defines colors like cursor color of the text fields.
primary: Colors.white,
),
// Decoration theme for the text fields.
inputDecorationTheme: InputDecorationTheme(
hintStyle: const TextStyle(color: Colors.white),
labelStyle: const TextStyle(color: Colors.white),
focusedBorder: border,
enabledBorder: border,
),
),
home: Scaffold(
resizeToAvoidBottomInset: false,
Expand Down Expand Up @@ -106,37 +121,19 @@ class MySampleState extends State<MySample> {
isExpiryDateVisible: true,
cardHolderName: cardHolderName,
expiryDate: expiryDate,
themeColor: Colors.blue,
textColor: Colors.white,
cardNumberDecoration: InputDecoration(
cardNumberDecoration: const InputDecoration(
labelText: 'Number',
hintText: 'XXXX XXXX XXXX XXXX',
hintStyle: const TextStyle(color: Colors.white),
labelStyle: const TextStyle(color: Colors.white),
focusedBorder: border,
enabledBorder: border,
),
expiryDateDecoration: InputDecoration(
hintStyle: const TextStyle(color: Colors.white),
labelStyle: const TextStyle(color: Colors.white),
focusedBorder: border,
enabledBorder: border,
expiryDateDecoration: const InputDecoration(
labelText: 'Expired Date',
hintText: 'XX/XX',
),
cvvCodeDecoration: InputDecoration(
hintStyle: const TextStyle(color: Colors.white),
labelStyle: const TextStyle(color: Colors.white),
focusedBorder: border,
enabledBorder: border,
cvvCodeDecoration: const InputDecoration(
labelText: 'CVV',
hintText: 'XXX',
),
cardHolderDecoration: InputDecoration(
hintStyle: const TextStyle(color: Colors.white),
labelStyle: const TextStyle(color: Colors.white),
focusedBorder: border,
enabledBorder: border,
cardHolderDecoration: const InputDecoration(
labelText: 'Card Holder',
),
onCreditCardModelChange: onCreditCardModelChange,
Expand Down

0 comments on commit 145df0b

Please sign in to comment.