credit_card_validate: ^0.0.3 copied to clipboard
Easily validate credit card numbers using the Luhn Algorithm. Also identify the brand of the credit card.
Using this package you can easily validate a credit card number, and identify the brand of the credit card.
Note: This package can be used in Flutter for Mobile, Web and Desktop.
Currently Supported Brands #
- American Express
Add the following line to your dependencies:
flutter packages get
Import the package wherever you want to use it.
For a fully functional demo, please visit https://creditcardvalidator.netlify.com/
Validating a Credit Card Number
bool isValid = CreditCardValidator.isCreditCardValid(cardNumber: '4716073082297205')
Identifying Credit Card Brand
String brand = CreditCardValidator.identifyCardBrand('4716073082297205');
For a fully functional example, please see the example directory
Issues and Improvements #
Feel free to contribute at: https://github.com/ayush221b/credit_card_validate/issues