flutter credit card
a flutter package allows you to easily implement the credit card’s ui easily with the card detection.
installing
- add dependency to
pubspec.yaml
get the latest version in the ‘installing’ tab on pub.dartlang.org
dependencies:
flutter_credit_card: 0.1.1
- import the package
import 'package:flutter_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),
),
Comments are closed.