credit_card 0.1.8
Flutter Credit Card #
A Flutter package allows you to easily implement the Credit card's UI easily with the Card detection.
Preview #
Installing #
-
Add dependency to
pubspec.yaml
Get the latest version in the 'Installing' tab on pub.dartlang.org
dependencies:
credit_card: 0.1.6
- Import the package
import 'package:credit_card/flutter_credit_card.dart';
- Adding CreditCardWidget
With required parameters
CreditCardWidget(
cardNumber: cardNumber,
expiryDate: expiryDate,
cardHolderName: cardHolderName,
cvvCode: cvvCode,
showBackView: isCvvFocused, //true when you want to show cvv(back) view
),
With optional parameters
CreditCardWidget(
cardNumber: cardNumber,
expiryDate: expiryDate,
cardHolderName: cardHolderName,
cvvCode: cvvCode,
showBackView: isCvvFocused,
cardbgColor: Colors.black,
height: 175,
textStyle: TextStyle(color: Colors.yellowAccent),
width: MediaQuery.of(context).size.width,
animationDuration: Duration(milliseconds: 1000),
),
- Adding CreditCardForm
CreditCardForm(
themeColor: Colors.red,
onCreditCardModelChange: (CreditCardModel data) {},
),
How to use #
Check out the example app in the example directory or the 'Example' tab on pub.dartlang.org for a more complete example.
Getting Started #
This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Credit #
This package's animation is inspired from from this Dribbble art. This package is basend on flutter_credit_card.
0.1.3 #
- Feature : Applied Default ThemeData.
0.1.8 #
- Feature : Updated description.
0.1.2 #
- Added CreditCard with Form Widget
CreditCardForm
. - Bug and Lint check fixes
0.1.1 #
- Code Improvements
0.1.02 #
- Code Improvements
0.1.01 #
- Code Improvements
0.1.0 #
- First Release
Flutter Credit Card Example #
A new Flutter application demonstrate use of the CreditCard widget package.
Running the app #
Get packages #
flutter packages get
Run the app #
flutter run
Getting Started #
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
-Lab: Write your first Flutter app -Cookbook: Useful Flutter samples
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies:
credit_card: ^0.1.8
2. Install it
You can install packages from the command line:
with Flutter:
$ flutter pub get
Alternatively, your editor might support flutter pub get
.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
import 'package:credit_card/credit_card_form.dart';
import 'package:credit_card/credit_card_model.dart';
import 'package:credit_card/credit_card_widget.dart';
import 'package:credit_card/flutter_credit_card.dart';
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
70
|
Health:
Code health derived from static analysis.
[more]
|
100
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
100
|
Overall:
Weighted score of the above.
[more]
|
85
|
We analyzed this package on Dec 11, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.0
- pana: 0.13.1+4
- Flutter: 1.12.13+hotfix.4
Health suggestions
Format lib/credit_card_model.dart
.
Run flutter format
to format lib/credit_card_model.dart
.
Dependencies
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=2.1.0 <3.0.0 | ||
flutter | 0.0.0 | ||
Transitive dependencies | |||
collection | 1.14.11 | 1.14.12 | |
meta | 1.1.8 | ||
sky_engine | 0.0.99 | ||
typed_data | 1.1.6 | ||
vector_math | 2.0.8 | ||
Dev dependencies | |||
cached_network_image | ^1.1.1 | ||
flutter_test |