You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🔥 "uCreditCard" is a Flutter package that offers a customizable solution for showing the UI of credit cards within your app. Elevate user engagement with captivating flip animations and enhance your app's visual appeal effortlessly!
This will create a credit card user interface with the cardholder's name, card number, and validity date. For more advanced usage, see the following parameters:
65
63
66
64
### Parameters
@@ -91,10 +89,8 @@ This will create a credit card user interface with the cardholder's name, card n
91
89
| `disableHapticFeedBack` | `bool` | A boolean flag to disable the haptic feedback. Example — card flipping or tapping on placeholder to see balance
92
90
| `width` | `double` | A double value to set the width of the card, maximum value is 300.
Get ready to create a sleek and stylish credit card interface with just a few lines of code! With this package, you can easily customize the cardholder's name, card number, validity dates, and gradient colors to make it uniquely yours.
If you want to set the width of the card, use `width:` property.
152
147
Better NOT wrap with `SizedBox(width: ..., child: CreditCardUi(....))`, instead use `width:` right from the `CreditCardUi()`
153
148
154
-
155
-
156
149
```dart
157
150
CreditCardUi(
158
151
width: 300, // 👈 this will set the width of the card
@@ -167,13 +160,15 @@ CreditCardUi(
167
160
Note: Setting up any value more than 300 is not considered, maximum width can be 300 only.
168
161
169
162
#### Additional Customizations
163
+
170
164
To further customize the card, you can add a background image by using the `backgroundDecorationImage` property. Additionally, you can include a logo for the card provider using the `cardProviderLogo` property. This logo can be positioned on either the left or the right side of the card using the `cardProviderLogoPosition` property.
171
165
172
166
If you want to specify a particular card type to display, you can set it using the `cardType` property. If you prefer not to specify a card type, you can set `cardType: CardType.other`.
173
167
174
168
Here is an example of how to use these customization options:
To display the balance of your card, simply set `showBalance: true` and provide the balance amount using `balance: 200.0` (any double value). Enabling `autoHideBalance: true` will generate a placeholder labeled "Tap to see balance". Users can then tap on this placeholder to reveal the balance.
204
196
205
197
```dart
@@ -221,6 +213,7 @@ CreditCardUi(
221
213
```
222
214
223
215
#### Card Flipping Animation
216
+
224
217
To enable the flipping animation by default, simply set the property `enableFlipping: true`. You can set CVV by `cvvNumber: 000`.
There are already many credit card packages out there, but none of them look realistic. So, I've decided to create something that will look the same as our cards in real life. Additionally, this project was inspired by a [Native Android library](https://github.com/vinaygaba/CreditCardView).
255
246
247
+
There are already many credit card packages out there, but none of them look realistic. So, I've decided to create something that will look the same as our cards in real life. Additionally, this project was inspired by a [Native Android library](https://github.com/vinaygaba/CreditCardView).
256
248
257
249
## Contributor
258
250
@@ -270,4 +262,3 @@ There are already many credit card packages out there, but none of them look rea
270
262
## License
271
263
272
264
This package is released under the [BSD 3-Clause License](https://raw.githubusercontent.com/utpal-barman/u-credit-card-flutter/main/LICENSE).
0 commit comments