Skip to content

Commit ac16135

Browse files
committed
docs: Updated README.md
1 parent 560d98d commit ac16135

File tree

1 file changed

+12
-21
lines changed

1 file changed

+12
-21
lines changed

README.md

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
# uCreditCard 💳
2-
### Credit Card UI as Flutter Widget 💎
2+
3+
## Credit Card UI as Flutter Widget 💎
34

45
[![pub package](https://img.shields.io/pub/v/u_credit_card.svg?logo=dart&logoColor=00b9fc)](https://pub.dartlang.org/packages/u_credit_card)
56
[![Last Commits](https://img.shields.io/github/last-commit/utpal-barman/u-credit-card-flutter?logo=git&logoColor=white)](https://github.com/utpal-barman/u-credit-card-flutter/commits/main)
67
[![Pull Requests](https://img.shields.io/github/issues-pr/utpal-barman/u-credit-card-flutter?logo=github&logoColor=white)](https://github.com/utpal-barman/u-credit-card-flutter/pulls)
78
[![Code size](https://img.shields.io/github/languages/code-size/utpal-barman/u-credit-card-flutter?logo=github&logoColor=white)](https://github.com/utpal-barman/u-credit-card-flutter)
89
[![License](https://img.shields.io/github/license/utpal-barman/u-credit-card-flutter?logo=open-source-initiative&logoColor=green)](https://github.com/utpal-barman/u-credit-card-flutter/blob/main/LICENSE)
910

10-
1111
🔥 "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!
1212

1313
<p align="center">
1414
<img src="https://user-images.githubusercontent.com/16848599/233195178-b4fb8007-ba2e-48ed-8020-7a0854d5038c.png" width="700"/>
1515
</p>
1616

17+
## Resources 📚
1718

18-
### Resources 📚
1919
- [Documentation](https://pub.dev/documentation/u_credit_card/latest/u_credit_card/CreditCardUi-class.html)
2020
- [Pub Package](https://pub.dev/packages/u_credit_card)
2121
- [GitHub Repository](https://github.com/utpal-barman/u-credit-card-flutter)
2222

23-
2423
## Getting Started: Installation 💻
2524

26-
**👉 In order to start using Credit Card UI you must have the [Flutter SDK](https://docs.flutter.dev/get-started/install) installed on your machine.**
25+
**👉 To start using Credit Card UI you must have the [Flutter SDK](https://docs.flutter.dev/get-started/install) installed on your machine.**
2726

2827
Add `u_credit_card` to your `pubspec.yaml`:
2928

@@ -40,8 +39,8 @@ flutter packages get
4039

4140
---
4241

43-
4442
## Usage
43+
4544
To use the `CreditCardUi()` widget, import the package:
4645

4746
``` dart
@@ -60,7 +59,6 @@ CreditCardUi(
6059

6160
<img width="432" alt="u_credit_card_basic_setup" src="https://user-images.githubusercontent.com/16848599/232335773-5e6fdd6e-a4d9-4c01-a202-48cbca935cbe.png">
6261

63-
6462
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:
6563

6664
### Parameters
@@ -91,10 +89,8 @@ This will create a credit card user interface with the cardholder's name, card n
9189
| `disableHapticFeedBack` | `bool` | A boolean flag to disable the haptic feedback. Example — card flipping or tapping on placeholder to see balance
9290
| `width` | `double` | A double value to set the width of the card, maximum value is 300.
9391

94-
95-
96-
9792
#### Example
93+
9894
``` dart
9995
CreditCardUi(
10096
cardHolderFullName: 'John Doe',
@@ -104,6 +100,7 @@ CreditCardUi(
104100
topLeftColor: Colors.blue,
105101
),
106102
```
103+
107104
<img width="432" alt="u_credit_card_nfc_basic" src="https://user-images.githubusercontent.com/16848599/232335806-159f4873-7fcb-46e0-b559-bc5a59ab61bf.png">
108105

109106
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.
@@ -128,8 +125,6 @@ CreditCardUi(
128125

129126
<img width="432" alt="u_credit_card_nfc" src="https://user-images.githubusercontent.com/16848599/232332749-92d270b6-786d-4cb4-bc80-71654ce6fd56.png">
130127

131-
132-
133128
#### Custom Gradient
134129

135130
``` dart
@@ -141,18 +136,16 @@ CreditCardUi(
141136
bottomRightColor: Colors.purpleAccent,
142137
),
143138
```
139+
144140
This will create a credit card user interface with a red-to-purple gradient.
145141

146142
<img width="432" alt="u_credit_card_gradient" src="https://user-images.githubusercontent.com/16848599/232333158-e0a3f488-cb36-4142-91a7-12d7d9546fca.png">
147143

148-
149144
#### Setting the card width
150145

151146
If you want to set the width of the card, use `width:` property.
152147
Better NOT wrap with `SizedBox(width: ..., child: CreditCardUi(....))`, instead use `width:` right from the `CreditCardUi()`
153148

154-
155-
156149
``` dart
157150
CreditCardUi(
158151
width: 300, // 👈 this will set the width of the card
@@ -167,13 +160,15 @@ CreditCardUi(
167160
Note: Setting up any value more than 300 is not considered, maximum width can be 300 only.
168161

169162
#### Additional Customizations
163+
170164
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.
171165

172166
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`.
173167

174168
Here is an example of how to use these customization options:
175169

176170
Example:
171+
177172
``` dart
178173
CreditCardUi(
179174
cardHolderFullName: 'John Doe',
@@ -195,11 +190,8 @@ CreditCardUi(
195190
),
196191
```
197192

198-
199-
200193
<img width="432" alt="Screenshot_2023-04-20_at_2 02 42_AM-removebg-preview" src="https://user-images.githubusercontent.com/16848599/233195568-5a197e2b-115c-46b1-876c-3428726f38cb.png">
201194

202-
203195
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.
204196

205197
```dart
@@ -221,6 +213,7 @@ CreditCardUi(
221213
```
222214

223215
#### Card Flipping Animation
216+
224217
To enable the flipping animation by default, simply set the property `enableFlipping: true`. You can set CVV by `cvvNumber: 000`.
225218

226219
```dart
@@ -245,14 +238,13 @@ CreditCardUi(
245238

246239
<img src="https://github.com/utpal-barman/u-credit-card-flutter/assets/16848599/350654f2-30c1-464b-93f2-7ed721f07792" width="432" />
247240

248-
249241
ধন্যবাদ
250242

251243
---
252244

253245
## Inspiration
254-
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).
255246

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).
256248

257249
## Contributor
258250

@@ -270,4 +262,3 @@ There are already many credit card packages out there, but none of them look rea
270262
## License
271263

272264
This package is released under the [BSD 3-Clause License](https://raw.githubusercontent.com/utpal-barman/u-credit-card-flutter/main/LICENSE).
273-

0 commit comments

Comments
 (0)