credit_card_number_validator 1.0.4 copy "credit_card_number_validator: ^1.0.4" to clipboard
credit_card_number_validator: ^1.0.4 copied to clipboard

A dart package to check if card number is valid and also returns card type as well.

credit_card_number_validator #

A dart package to check if card number is valid and also returns card type as well.

Installing #

  1. Add dependency to pubspec.yaml

    Get the current version from the 'Installing' tab

dependencies:
    credit_card_number_validator: *current-version*
  1. Import the package
import 'package:credit_card_number_validator/credit_card_number_validator.dart';

Usage #

A basic example

Map<String, dynamic> cardData = CreditCardValidator.getCard(cardNumberString);
String cardType = cardData[CreditCardValidator.cardType];
bool isValid = cardData[CreditCardValidator.isValidCard];
# Features
* Supported cards:
  * Visa
  * Mastercard
  * American Express
  * Discover
  * Diners Club
  * JCB


# Author
Preeth Prathapan - *Creator and repo owner* - [Github Profile](https://github.com/preethzcodez)

# License
This project is licensed under the MIT License - see the [LICENSE file](LICENSE) for more details
14
likes
40
pub points
72%
popularity

Publisher

verified publisherpreethzcodez.dev

A dart package to check if card number is valid and also returns card type as well.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on credit_card_number_validator